Skip to contents

nsSank 0.4.0

Major changes

  1. 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.
  2. Added plot_sankey: creates an in-R Sankey diagram from events and cohort data.
  3. Added format_sankey_data: Converts events and cohort data into the required JSON format needed to make Sankeys on the Target RWE platform.
  4. Added sankey_counts_table: Tabulates the number of patients in each state at each time point.
  5. 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
  6. Added filter_gofl: extracts a specific stratum from the list output of plot_sankey(), sankey_counts_table(), or sankey_transition_counts() when gofl_formula is specified

Minor Changes

  1. Fixed a bug that prevented sankey_list_maker from correctly passing a custom id_var argument.

nsSank 0.3.5

Minor changes

  1. Fixed bug that dropped “None” states in sunbursts when combine_repeats = FALSE

nsSank 0.3.0

Major changes

  1. 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.
  2. 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

  1. Fixed bug that kept in None state label when not present.
  2. Fixed bug (mentioned above) that forced users to have a death_date variable.
  3. If variables to be used in the filtering and stratification are stype vectors package will convert to base types.
  4. 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.
  5. Always calculates pathways if unweighted (even if there are a lot of states/stages) but throws warning.