it_pop <- data.frame(
age = limits_to_age_groups(seq(0, 80, by = 5), notation = "brackets"),
population = c(rep(2.5e6, 4), rep(3.5e6, 4), rep(5e6, 6), 5e6, 7e6, 4e6)
)
# rebin into 10-year age groups
rebin_ages(it_pop, age_limits = seq(0, 100, by = 10))
Run the code above in your browser using DataLab