calculate_age_nearest_birthday: Calculate age at nearest birthday

View source: R/age_functions.r

calculate_age_nearest_birthdayR Documentation

Calculate age at nearest birthday

Description

Returns the age at the previous or next birthday, whichever is nearest.

Usage

calculate_age_nearest_birthday(birthdate, asOfDate = Sys.Date())

Arguments

birthdate

Birthdate in character (YYYY-MM-DD) or as class date.

asOfDate

The date to calculate the age. Default is the system date.

Value

Age in years as numeric

Examples

## Not run: calculate_age_nearest_birthday("1950-01-01")

rexmacey/aasim documentation built on Oct. 29, 2024, 9:30 a.m.