ageFun: ageFun

ageFunR Documentation

ageFun

Description

Calculates age in years

Usage

ageFun(born, date = Sys.time(), format = "%Y-%m-%d",
  include.months = TRUE)

Arguments

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

Value

a list including age in years and months (if specified)

Author(s)

Pablo O Rodriguez

Examples

ageFun(born = "1900-02-01",date = "1950-01-01",format = "%Y-%m-%d",include.months = FALSE)


pablorodrig16/summaryFunctions documentation built on April 4, 2023, 5:18 a.m.