qec_age_table: Create age group table for QEC

View source: R/qec_age_table.R

qec_age_tableR Documentation

Create age group table for QEC

Description

Produces rates (per 100,000) by age group for the QEC. It's **really** important that the value for the denominator is the same across all records for the same age group

Usage

qec_age_table(df, age_var, denom)

Arguments

df

A data frame

age_var

A variable giving the age group for the record

denom

A variable giving the denominator for the age **group**

Value

a tibble containing the aggregated data

Examples

dat <- data.frame(age_group = c(1, 1, 1, 2, 2, 2, 2),
                  denominator = c(500000,500000,500000, 600000, 600000, 600000, 600000))
qec_age_table(df = dat, age_var = age_group, denom = denominator)

PublicHealthEngland/hcaidcs documentation built on Jan. 19, 2024, 8:38 a.m.