View source: R/survial_analysis.R
show_km | R Documentation |
Wrapper function of plot KM curve by survial and survminer packages
show_km(data, var, ...)
data |
A dataframe, containing survial status (as "OS" 0=alive, 1=dead) and survial time (as "OS.time") |
var |
A character vector or column name (not need been quoted), varible to separate samples |
... |
other arguments passed to survminer::ggsurvplot |
ggsurvplot object
show_km(sample_survival,"gender") ## or show_km(sample_survival,gender)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.