服务热线
178 0020 3020
install.packages("survminer")
install.packages("survival")
install.packages("ggpubr")
install.packages("magrittr")
install.packages("ggplot2")
library("survival")
library("ggplot2")
library("ggpubr")
library("magrittr")
library("survminer")
mydata <- survfit(Surv(time,status)~sex,data=lung)
ggsurvplot(mydata,conf.int=TRUE,pval=TRUE,surv.median.line="hv",legend.title="sex",legend.labs=c("male","female"),risk.table=TRUE,ncensor.plot=TRUE)+ggtitle("R2-09")
附件