ageFun | R Documentation |
Calculates age in years
ageFun(born, date = Sys.time(), format = "%Y-%m-%d",
include.months = TRUE)
born |
is a character or date class value/vector representing the date of birth |
date |
is a character or date class value/vector representing the date to calculate age |
format |
is a character string the format for character to date conversion (as in as.Date() function) |
include.months |
is a logical to decide if months are shown in results |
a list including age in years and months (if specified)
Pablo O Rodriguez
ageFun(born = "1900-02-01",date = "1950-01-01",format = "%Y-%m-%d",include.months = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.