referencing the following manual for time dependent survival in R:
https://cran.r-project.org/web/packages/survival/vignettes/timedep.pdf
From the vignette example:
subject time1 time2 death creatinine
5 0 90 0 0.9
5 90 120 0 1.5
5 120 185 1 1.2
The data I have is in the following format:
In dd-mm-yyyy format
subject date death creatinine
5 01-01-2022 0 0.9
5 01-04-2022 0 1.5
5 01-05-2022 0 1.2
5 05-07-2022 1 1.2
I need to format the data below to match to the data above.