surv_plot: Plot survival curves using survival and plotly package.

View source: R/surv_plot.r

surv_plotR Documentation

Plot survival curves using survival and plotly package.

Description

Plot a survival K-M estimate and shows both survival and n.event/n.risk.

Usage

surv_plot(aj, type = c("both", "surv", "wx"))

Arguments

aj

aj previously fitted model (using 'survival::survfit()').

type

should the "wx", "survival" or "both" be plotted?

Value

a plotly with two plots, one for survival probabilities and another for wx.

Examples


require(survival)
aj <- survfit(Surv(time, status) ~ sex, data = lung)
surv_plot(aj)


vitorcapdeville/survtools documentation built on Feb. 12, 2023, 12:01 p.m.