Convert ansible data to sunburst id ordered data
sunburst_id_data(
cohort,
data,
id_var = "patient_id",
index_var = "index_date",
end_of_study = "censor_date",
states = NULL,
trt_holiday = NULL,
select_event = "combine",
combine_repeats = T
)
A tibble. Cohort file with one record per subject.
A tibble. Events file with one record per mutually exclusive time interval per subject. Return object
from ansible
.
String. Variable name of the id/grouping variable.
Date. Indicates cohort_file
date variable name per subject when event ordering should begin.
Date. Indicates cohort_file
date variable name per subject when event ordering should end.
Character. Treatment states to include in sunburst. Default NULL
uses all treatments in data.
Numeric. Indicates minimum span of days to consider a "None" state (i.e. if we are only interested
in treatment holidays of longer than x number of days). Default NULL
preserves all gaps of treatment.
Character. How should events be selected at each time point? Default "combine" returns all events that occurred at the time point. "first" takes the first event, "last" takes the last (most recent) event.
Logical. Combine identical states that occur in sequence? Default is TRUE.
List with id data and states used to make the numeric.