data('kentucky')
kentucky = terra::unwrap(kentucky)
head(terra::values(kentucky))
poptry <- formatPopulation(kentucky, breaks = c(seq(0, 80, by=10), Inf))
head(poptry)
poptryagg <- formatPopulation(kentucky,
breaks = c(seq(0, 80, by=10), Inf),
aggregate.by=c("sex", "age"))
head(poptryagg)
Run the code above in your browser using DataLab