Sorry for the wait. I am not too sure how to use R so please let me know if this data set works. I tried to follow the video but I am not sure if this is correct.
ClinicalTrialEvents<-tibble::tribble(
~ID, ~Event_Day, ~Start_surgery, ~Day_since_surgery, ~Event,
1, "2018-02-28", "2018-01-02", 1.93, "SD",
1, "2018-06-19", "2018-01-02", 5.57, "Progressive disease",
1, "2019-07-15", "2018-01-02", 18.42, "Death",
2, "2019-07-26", "2019-06-08", 1.58, "SD",
2, "2020-03-08", "2019-06-08", 9, "Progressive disease",
2, "2021-06-10", "2019-06-08", 24.07, "Death",
3, "2019-02-18", "2017-06-22", 19.96, "PR",
3, "2019-06-20", "2017-06-22", 23.97, "Progressive disease",
3, "2020-06-17", "2017-06-22", 35.87, "Death",
4, "2018-09-10", "2018-07-05", 2.17, "PP",
4, "2019-04-29", "2018-07-05", 9.8, "Progressive disease",
4, "2019-11-14", "2018-07-05", 16.3, "Death",
5, "2018-08-02", "2018-07-07", 0.84, "SD",
5, "2019-05-11", "2018-07-07", 10.13, "Progressive disease",
5, "2020-04-03", "2018-07-07", 20.9, "Death",
6, "2019-05-15", "2019-04-16", 0.94, "SD",
6, "2019-08-16", "2019-04-16", 4, "Progressive disease",
6, "2020-06-06", "2019-04-16", 13.7, "Death",
7, "2019-07-25", "2019-05-27", 1.9, "SD",
7, "2020-02-18", "2019-05-27", 8.76, "Progressive disease",
7, "2020-09-17", "2019-05-27", 15.7, "Death",
8, "2017-02-01", "2016-12-28", 1.14, "SD"
)
head(ClinicalTrialEvents)
#> # A tibble: 6 x 5
#> ID Event_Day Start_surgery Day_since_surgery Event
#> <dbl> <chr> <chr> <dbl> <chr>
#> 1 1 2018-02-28 2018-01-02 1.93 SD
#> 2 1 2018-06-19 2018-01-02 5.57 Progressive disease
#> 3 1 2019-07-15 2018-01-02 18.4 Death
#> 4 2 2019-07-26 2019-06-08 1.58 SD
#> 5 2 2020-03-08 2019-06-08 9 Progressive disease
#> 6 2 2021-06-10 2019-06-08 24.1 Death