aggregate_sample_age_group | R Documentation |
Aggregate specified numeric
columns by population-weighted
age groups (rather than single year ages), split by specified categories.
aggregate_sample_age_group(
results_list,
aggr_cols = c("area_id", "area_name", "year", "model", "type"),
num_cols,
age_groups = c("0-4", "5-9", "10-14", "15-19", "20-24", "25-29", "30-34", "35-39",
"40-44", "45-49", "50-54", "54-59", "0+", "10+", "15+", "0-14", "10-24", "15-24",
"10-29", "15-29", "10-39", "15-39", "10-49", "15-49", "30-49")
)
results_list |
list of |
aggr_cols |
Columns to aggregate samples by, Default: c("area_id", "area_name", "year", "model", "type") |
num_cols |
|
age_groups |
Age groups to aggregate by, Default: c("0-4", "5-9", "10-14", "15-19", "20-24", "25-29", "30-34", "35-39", "40-44", "45-49", "50-54", "54-59", "0+", "10+", "15+", "15-24", "10-24", 15-29", "10-29", "15-39", "10-39", "15-49", "10-49") |
data.frame
with samples aggregated by aggr_cols
and
weighted by population.
combine_areas
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.