Description Usage Arguments Value Examples
Collapse variable into subgroup positions
1 | make_grps(x, grps)
|
x |
Character vector |
grps |
Named list of variable values or positions within vector |
Named list of variable values from given positions
1 2 3 4 5 6 7 8 9 | ages <- c("Under 5 years", "5 to 9 years", "10 to 14 years", "15 to 17 years",
"18 and 19 years", "20 years", "21 years", "22 to 24 years",
"25 to 29 years", "30 to 34 years", "35 to 39 years", "40 to 44 years")
age_grps <- list(
under18 = 1:4,
ages18_24 = 5:8,
ages18_34 = 5:10
)
make_grps(ages, age_grps)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.