age: Compute the age of a person from two dates.

View source: R/age.R

ageR Documentation

Compute the age of a person from two dates.

Description

Compute the age in years of an individual based on the birth date and another (subsequent) date

Usage

age(from, to)

Arguments

from

a vector of dates (birth dates)

to

a vector of current dates

Details

Returns the full number of years that a person is old on a given date.

Value

A vector of ages (in years)

Author(s)

Claus Ekstrom claus@rprimer.dk

See Also

as.POSIXlt

Examples


born <- c("1971-08-18", "2000-02-28", "2001-12-20")
check <- c("2016-08-28")
age(born, check)


MESS documentation built on Aug. 21, 2023, 1:05 a.m.

Related to age in MESS...