age.in.years: Compute Age From Date-of-Birth

Description Usage Arguments Value Author(s) See Also Examples

Description

Computes the age of a person (in years) on a specified date from the person's date of birth.

Usage

1
age.in.years(on.this.date, birth.date)

Arguments

on.this.date

A vector of Date objects. The date on which the age is to be computed.

birth.date

A vector of Date objects. The date-of-birth.

Value

An integer vector containing the age in years.

Author(s)

Ben Rich <[email protected]>

See Also

difftime

Examples

1
2
3
age.in.years(
  as.Date(c("2012-03-01", "2012-02-29", "2012-02-28")),
  as.Date(c("1980-02-03", "1980-02-29", "1980-05-28")))

benjaminrich/PCSmisc documentation built on Dec. 17, 2017, 12:50 a.m.