get_age: Returns the fractional age in years, months or days between...

View source: R/get_age.R

get_ageR Documentation

Returns the fractional age in years, months or days between the start_date and the end_date.

Description

Returns the fractional age in years, months or days between the start_date and the end_date.

Usage

get_age(start_date, end_date, unit)

Arguments

start_date

a POSIXct or POSIXt object with the beginning date (such as a birth date).

end_date

a POSIXct or POSIXt object with the ending date (such as a death date).

unit

one of c("year", "month", "week", "day") that become the unit used as the devisor for the time interval.


rmsharp/rmsutilityr documentation built on Feb. 13, 2024, 6:01 p.m.