Description
Compute rolling variables (last visit, last 5 visits, last month and last year)
Usage
rolling_var(id, var, start_date, id_encounter)
Value
A dataframe containing the rolling variables.
Arguments
- id
Patient id numeric vector
- var
Variable numeric vector
- start_date
Time numeric vector
- id_encounter
Encounter id vector