sunburst_maker
converts ordered sunburst data at the patient level to summarized counts in
the nested hierarchical list format needed for the nswidgets:sunburst
function.
sunburst_maker(
cohort,
id_data,
none = "None",
id_var = "patient_id",
gofl_formula = NULL,
collapse_states = NULL,
max_levels = NULL
)
Cohort data.frame. In case you want to add on stratification or filter variables.
List. One element for patient level order data, one element with states found in that data. Returned
from sunburst_id_data
.
Character. How to label the "empty" state. Default is "None".
Character. ID variable in cohort. Default "index_date".
Formula. Used in gofl
to create filters and stratifications.
How to redefine states if combinations are anticipated. As a named list
it allows users to identify how states
should be grouped with unique identifiers. As a named vector
it assigns a hierarchy in the order that the states appear. The names are
how the states show up on the sunburst. Default NULL
.
Integer. How many levels (sunburst rings) should be calculated? Max is 8.
Nested list with all the treatment pathways + sizes at each level.