主要函数Usage
Surv(time, time2, event,
type=c('right', 'left', 'interval', 'counting', 'interval2', 'mstate'),
origin=0)
ggsurvplot(
fit,
data = NULL,
fun = NULL,
color = NULL,
palette = NULL,
linetype = 1,
conf.int = FALSE,
pval = FALSE,
pval.method = FALSE,
test.for.trend = FALSE,
surv.median.line = "none",
risk.table = FALSE,
cumevents = FALSE,
cumcensor = FALSE,
tables.height = 0.25,
group.by = NULL,
facet.by = NULL,
add.all = FALSE,
combine = FALSE,
ggtheme = theme_survminer(),
tables.theme = ggtheme,
...
)
# 加载包
library("survival")
library("survminer")
setwd("/test")
class(lung)
head(lung)
table(lung$sex)
#创建生存曲线
fit<- survfit(Surv(time, status

最低0.47元/天 解锁文章
525

被折叠的 条评论
为什么被折叠?



