here is my dataframe (whiskey)
Time = c(1596,1514,356,2085,1921,318,83,328,
Status = c(2, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1)
when I enter the following code, I get my KM curve as expected.
ggsurvplot(survfit(Surv(Time,Status) ~1, data = whiskey), color="turquoise2", surv.median.line = "hv", xscale = "d_m")
however, I want to do 2 additional things:
- I want the survival to be displayed in whole integers when it comes to months. As you can see the original data was in days. Is there any quick way of 'piping' the 'Time' variable to obtain this rather than going back to excel and re-importing datasheet after modification?
- I want the actual value of the Median survival displayed on the X (horizontal) axis, rather than merely a dotted line.
Your help is once again appreciated. For context, these are survival curves for cancer patients. 2= death, 1 = censored.