ONS_age_groups: Title Calculate ONS populations by age group for any age...

View source: R/add_age_groups.R

ONS_age_groupsR 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

Description

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

Usage

ONS_age_groups(populations, age_groups)

Arguments

populations

object containing ONS populations

age_groups

data.frame containing age group categories to calculate populations for

Value

exports a data.frame with aggregated population numbers by age group

Examples


 # 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)


DHatziioanou/simpleepi documentation built on Sept. 24, 2024, 5:25 a.m.