View source: R/age_functions.r
calculate_age_nearest_birthday | R Documentation |
Returns the age at the previous or next birthday, whichever is nearest.
calculate_age_nearest_birthday(birthdate, asOfDate = Sys.Date())
birthdate |
Birthdate in character (YYYY-MM-DD) or as class date. |
asOfDate |
The date to calculate the age. Default is the system date. |
Age in years as numeric
## Not run: calculate_age_nearest_birthday("1950-01-01")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.