Skip to contents

Function to create timeline data, to be used in a timevis::timeline() object.

Usage

get_timeline_data(
  data,
  available_data = NULL,
  expected_ae_cols = c("AE Name", "Serious Adverse Event", "AE start date",
    "AE end date", "SAE Start date", "SAE End date", "AE date of worsening",
    "CTCAE severity worsening"),
  timeline_cols = c("subject_id", "event_name", "form_repeat", "item_group", "start",
    "group", "end", "title", "className", "id", "order"),
  treatment_label = "💊 Tₓ"
)

Arguments

data

A list of data frames, with compatible clinical trial data.

available_data

Optional, data frame with all available data gathered. Used to extract visit information. If not provided, this data frame will be created internally by running get_available_data() on the provided data list.

expected_ae_cols

Character vector with expected columns for the adverse event table within the data list.

timeline_cols

Character vector with the name of the columns of the output data frame.

treatment_label

Character vector with the label to use for the treatment item in the timeline.

Value

A data frame with timeline data.