View source: R/add_age_groups.R
| ONS_age_groups | R Documentation | 
Title Calculate ONS populations by age group for any age grouping using ONS populations file from https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationprojections/datasets/tablea21principalprojectionukpopulationinagegroups
ONS_age_groups(populations, age_groups)
populations | 
 object containing ONS populations  | 
age_groups | 
 data.frame containing age group categories to calculate populations for  | 
exports a data.frame with aggregated population numbers by age group
 # Create age grouping
 # groups <- data.frame(under18 = c(0,17),
           # workingage = c(18,65),
           # over65 = c(66,"90+"),
           # stringsAsFactors = FALSE)
 # ONS_populations_3categories <- ONS_age_groups(ONS, groups)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.