Convert tagged cdf (patient_id, start_date, end_date, is_xx) to format needed for sankeys (id, start, end, state)

convert_tagged_cdf(cdf, id_var = "patient_id", rmv_prefix = "is_")

Arguments

cdf

Tagged CDF produced by the cohort package. The only tags in the file should be the ones that indicate states of interest.

id_var

Group identifier in the data. Default is patient_id

rmv_prefix

Regular expression used to remove matching text from the start of the is_xx variable names to create appropriate state names. Defaults to is_.