surv_plot | R Documentation |
Plot a survival K-M estimate and shows both survival and n.event/n.risk.
surv_plot(aj, type = c("both", "surv", "wx"))
aj |
aj previously fitted model (using 'survival::survfit()'). |
type |
should the "wx", "survival" or "both" be plotted? |
a plotly with two plots, one for survival probabilities and another for wx.
require(survival) aj <- survfit(Surv(time, status) ~ sex, data = lung) surv_plot(aj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.