Description Usage Arguments Value Author(s) Examples
Draw a survival curve based on survminer package. This is a wrapper function of ggsurvplot.
1 2 3 4 5 6 7 8 | draw_survival_curve(
exp,
living_days,
living_events,
write_name,
title_name = "",
threshold = NA
)
|
exp |
expression level for gene. |
living_days |
The survival time (days) for each individual. |
living_events |
The survival event for each individual, 0 indicates alive and 1 indicates death. Other choices are TRUE/FALSE (TRUE = death) or 1/2 (2=death). For interval censored data, the status indicator is 0=right censored, 1=event at time, 2=left censored, 3=interval censored. |
write_name |
The name for pdf file which contains the result figure. |
title_name |
The title for the result figure. |
threshold |
Threshold used to indicate the high risk or low risk. |
This function will generate a pdf file with 300dpi which compare survival curves using the Kaplan-Meier (KM) test.
Xin Yu
1 2 3 4 5 6 7 | data(demo_survival_data)
library(survival)
demo_set<-create_demo()
draw_survival_curve(demo_set[1,],
living_days = demo_survival_data[,1],
living_events =demo_survival_data[,2],
write_name = "demo_data" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.