roll_time_sum {PheVis} | R Documentation |
roll_time_sum
Description
Compute the cumulated information of what happened in past month and past year.
Usage
roll_time_sum(
id,
id_encounter,
var,
start_date,
win_size1 = 30,
win_size2 = 365,
name1 = "cum_month",
name2 = "cum_year"
)
Arguments
id |
Patient id numeric vector |
id_encounter |
Encounter id vector |
var |
Variable numeric vector |
start_date |
Time numeric vector |
win_size1 |
First window size (default is 30) |
win_size2 |
Second window size (default is 365) |
name1 |
name of first rolling var (default is "cum_month") |
name2 |
name of second rolling var (default is "cum_year") |
Value
A dataframe containing the rolling variables.
[Package PheVis version 1.0.4 Index]