Description Usage Arguments Examples
View source: R/survplot_functions.R
Create Kaplan-Meier plots
1 | SurvivalPlot(fit, LegendTitle, timeUnit, colors, pval = NULL, max.year = NULL)
|
fit |
the resulting object from surival::survfit |
LegendTitle |
a string |
timeUnit |
a string (years, months, days, etc) |
colors |
a character vector of the same length as the number of groups in the KM plot |
pval |
an option string wit the pvalue |
max.year |
a numeric value to set x-axis limits. |
1 2 | fit <- survival::survfit(survival::Surv(time, status) ~ x, data = survival::aml)
SurvivalPlot(fit=fit, LegendTitle="AML", timeUnit="months", colors=c("red","blue"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.