Learn R Programming

SocEpi (version 1.0.0)

age_grouping: Age grouping function

Description

Age grouping function creates standard population weights for user selected age groups. Allows for flexible age groups selection in smr, rii and st_rate functions. Internal use only.

Usage

age_grouping(age_group, st_pop, min_age, n_age)

Arguments

age_group

character string of age groups for which the results are to be provided.

st_pop

standard population weights to use.

min_age

minimum age group (to check if it is 0 or 0-4).

n_age

number of age groups.

Value

A small data frame of weights for user selected age groups.