Description Usage Arguments Value Examples
Convert vectors of ages to units of years
1 | age_in_years(age, age_unit)
|
age |
Vector of age values (numeric) |
age_unit |
Vector of age units ("Year(s)", "Month(s)", "Week(s)", "Day(s)", or \<NA\> (case-insensitive)) |
A numeric vector of ages in years
1 2 3 4 | ages <- c(70, 3, 53, 61, 20, 9)
units <- c("Years", "Weeks", "Years", "Years", "Months", "Months")
age_in_years(ages, units)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.