calculate_age: Calculate Age of Patients

Description Usage Arguments Value Examples

Description

This function calculates ages from patient birthdays

Usage

1
calculate_age(df, birth_date_var, end_date_var, new_var_name)

Arguments

df

Raw EHR dataset which includes birthdate covariate

birth_date_var

Birthdate covariate

end_date_var

End date for age calculation

new_var_name

What the newly created age variable should be called

Value

A data frame with a derived age variable

Examples

1
2
3
4
## Not run: 
calculate_age(df, Birth.Date, Encounter.Date, Derived.Age)

## End(Not run)

jjwillard/wfbmcr documentation built on May 7, 2019, 9:21 p.m.