服务热线
178 0020 3020
data(package=”survival”)
install.packages("ggpubr")
install.packages("survminer")
library(ggplot2)
library(ggpubr)
library(survminer)
library(survival)
fit<-survfit(Surv(time,status)~sex,data=lung)
ggsurvplot(fit,data=lung,color="sex",palette=c("red","blue"),title="R2-17",pval=TRUE,
surv.median.line="hv",
conf.int=TRUE,
legend.title="SEX",
legend.labs=c("Male","Female"),
risk.table=TRUE,
risk.table.col="sex",
ncensor.plot=TRUE)
附件