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