add_age_intervals | R Documentation |
Add a column (factor) with plain language description of the age range
add_age_intervals(
df,
breaks = NULL,
age_col = "Age",
group_col = "AgeGroup",
under = "Younger than ",
bridge = " to ",
over = " or Older",
factor_na = NULL,
keep_attrs = FALSE
)
df |
- data.frame |
breaks |
- integer - vector of age intervals (passed to cut) |
age_col |
- character - name of column with numeric ages |
group_col |
- character - name of factor column with text age ranges |
under |
- character - text to use for less/younger than |
bridge |
- character - text to use between the min and max |
over |
- character - text to use for greater/older than |
factor_na |
- character - text to use for NA values |
data.frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.