Create age categories from a age vector
group_ages(age_column, age_group = 5, max_age = 100, return_chr = TRUE)
a numeric vector of age to be categorized
Either a manually specified set of age groups OR an age interval to be divided up into equal parts. To manually specify the age range pass a vector of the right hand size of the age range. See example.
Maximum age in the age internal. For example if max_age is 100 then the function will calculate intervals all the way to 100+. This is ignored if a manual age range is specified.
Should the function return a character or vector?
A vector of age group the same length as the age_column