Convert ansible data to sankey id timed data
sankey_id_ansible( cohort, data, stages, id_var = "patient_id", index_var = "index_date", states = NULL, select_event = "combine" )
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
Numeric. Timepoints after index to evalute treatment states.
String. Variable name of the id/grouping variable.
cohort_file date variable name per subject when event ordering should begin.
Character. Treatment states to include in sunburst. Default
NULL uses all treatments in data.
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.
List with id data and states used to make the numeric.