Added create_time_varying_data: converts events and
cohort data into a time-varying interval dataset where each row
represents a time period per patient with indicator columns for active
treatments.
Added plot_sankey: creates an in-R Sankey diagram from
events and cohort data.
Added format_sankey_data: Converts events and cohort
data into the required JSON format needed to make Sankeys on the Target
RWE platform.
Added sankey_counts_table: Tabulates the number of
patients in each state at each time point.
Added sankey_transition_counts: Produces a table of
transitions between states, showing the starting state, ending state,
transition period, and number of patients for each transition
Fixed a bug that prevented sankey_list_maker from
correctly passing a custom id_var argument.
nsSank 0.3.5
Minor changes
Fixed bug that dropped “None” states in sunbursts when
combine_repeats = FALSE
nsSank 0.3.0
Major changes
Updated sankey_list_maker to tweak the following
arguments:
weight is a T/F value that indicates whether you want
the Sankey weighted or not.
censor_vars takes a vector of variables to use for
censoring. If named will create states with those names. Default is
NULL.
absorbing_var takes a vector of variables that will be
used for “absorbing” states. Required to be named. Default is
NULL. Replaces requirement of having a “death” variable in
the cohort.
Updated sunburst_maker and
sankey_list_maker to tweak the following arguments:
gofl_formula replaces strat_vars and
filt_vars. Now you can just enter your own
gofl formula for how you want the Sankey filtered.
Minor changes
Fixed bug that kept in None state label when not
present.
Fixed bug (mentioned above) that forced users to have a
death_date variable.
If variables to be used in the filtering and stratification are
stype vectors package will convert to base types.
gofl_formula can use v_nominal,
character, or nominal variables. If using a
character and there are > 10 unique values, will throw error and
force user to convert to nominal.
Always calculates pathways if unweighted (even if there are a lot of
states/stages) but throws warning.