cast_clones_to_long.Rd
Cast one-row-per-clone data to long format
cast_clones_to_long(df)
A data.frame with one row per clone as returned by create_clones()
A data.frame with one row per patient per time period per clone.
# Load the toy dataset
data(dummy_data)
# Create clones
clones <- create_clones(dummy_data,
id = "id",
event = "event",
time_to_event = "timetoevent",
exposure = "exposure",
time_to_exposure = "timetoexposure",
ced_window = 100)
#> Updating 4 patients' exposure and time-to-exposure based on CED window
clones_long <- cast_clones_to_long(clones)