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