This is just a wrapper method around survival::plot.survfit() with
custom defaults.
plot_surv(
x,
main = character(),
xlab = "Time",
ylab = "Overall survival probability",
mark.time = TRUE,
conf.int = FALSE,
col = palette.colors(max(1L, length(x$strata))),
times,
...
)survfit object.
character(1), plot title.
character(1), x-axis label.
character(1), y-axis label.
logical(1), if TRUE censoring times are marked, see
survival::plot.survfit() for details.
logical(1), if TRUE confidence interval is plotted, see
survival::plot.survfit() for details.
integer/character, specifying colors for each curve.
integer, vector of times to print on the x-axis.
further arguments passed to survival::plot.survfit().
a list with x and y containing the coordinates of the last point
of each curves.
library("survival")
srvfit <- survfit(Surv(time, status) ~ x, data = aml)
plot_surv(srvfit)