Compute the cumulated information of what happened in past month and past year.
roll_time_sum(
id,
id_encounter,
var,
start_date,
win_size1 = 30,
win_size2 = 365,
name1 = "cum_month",
name2 = "cum_year"
)A dataframe containing the rolling variables.
Patient id numeric vector
Encounter id vector
Variable numeric vector
Time numeric vector
First window size (default is 30)
Second window size (default is 365)
name of first rolling var (default is "cum_month")
name of second rolling var (default is "cum_year")