# NOT RUN {
library(survival)
fit=survfit(Surv(futime, fustat)~rx, data=ovarian)
#survival table
surv_table(fit)
#median survival rate
surv_median_time(fit)
#one year survaival rate
surv_year_rate(fit,365)
#two years survaival rate
surv_year_rate(fit,365*2)
# }
Run the code above in your browser using DataLab