服务热线
178 0020 3020
install.packages("survival")
install.packages("survminer")
library(survival)
library(survminer)
fit = survfit(Surv(time,status)~sex, data = lung)
ggsurvplot(fit, title="R2-38",
conf.int = TRUE,
conf.int.alpha = 0.2,
legend.title = "Sex",
legend.labs = c("Male","Female"),
pval=TRUE,
color = "sex",
palette=c("blue","pink"),
surv.median.line="hv",
pval.method = TRUE,
risk.table = "abs_pct",
risk.table.col="sex",
ncensor.plot=TRUE)
附件