Mostly used for plot labelling
limits_to_agegroups(
x,
limits = sort(unique(x)),
notation = c("dashes", "brackets")
)
Age groups as specified in notation
age limits to transform
lower age limits; if not given, will use all limits in x
whether to use bracket notation, e.g. [0,4) or dash notation, e.g. 0-4)
limits_to_agegroups(c(0, 5, 10))
Run the code above in your browser using DataLab