| combine_age | R Documentation |
Convert age group labels to a less detailed classification.
The three classifications recognized by combine_age()
are "single", "five", and "lt", as defined on
age_labels(). The following conversions are permitted:
"single" —> "lt"
"single" —> "five"
"lt" —> "five"
combine_age(x, to = c("five", "lt"))
x |
A vector of age labels |
to |
Type of age classification
to convert to: |
If x is a factor, then combine_age()
returns a factor; otherwise it returns a
character vector.
age_labels() to create age group labels
reformat_age() to convert existing age group labels
to a standard format
set_age_open() to set the lower limit
of the open age group
x <- c("0", "5", "3", "12")
combine_age(x)
combine_age(x, to = "lt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.