R/constants.R
decode_age_bracket.Rd
Take a text representation of an age bracket, such as '30-40' and
translate it into an ordered factor compatible with the global
age_brackets
variable.
decode_age_bracket(x)
x | A character or factor vector containing one or more age bracket
descriptions equivalent to levels of the |
---|
An ordered factor
#> [1] 0-19 30-39 #> Levels: 0-19 < 20-29 < 30-39 < 40-49 < 50-59 < 60-69 < 70-79 < 80+