Create a categorical age column from a converted ager27 column
Source:R/categorize_age_5.R
categorize_age_5.RdSimply makes more meaningful labels on the age column. Assumes that the age column was created from the convert_ager27() function. Allows for using tidyr::complete() even when some age/year/race combinations have no observations.
Examples
categorize_age_5(seq(0, 70, 5))
#> [1] 0-4 5-9 10-14 15-19 20-24 25-29 30-34 35-39 40-44 45-49 50-54 55-59
#> [13] 60-64 65-69 70-74
#> 18 Levels: 0-4 < 5-9 < 10-14 < 15-19 < 20-24 < 25-29 < 30-34 < ... < 85+