. , , R , , , tidyverse , .
library(tidyverse)
str(l$sex)
List of 14
$ n : int [1:2] 138 90
$ time : num [1:206] 11 12 13 15 26 30 31 53 54 59 ...
$ n.risk : num [1:206] 138 135 134 132 131 130 129 128 126 125 ...
$ n.event : num [1:206] 3 1 2 1 1 1 1 2 1 1 ...
$ n.censor : num [1:206] 0 0 0 0 0 0 0 0 0 0 ...
$ surv : num [1:206] 0.978 0.971 0.957 0.949 0.942 ...
$ type : chr "right"
$ strata : Named int [1:2] 119 87
..- attr(*, "names")= chr [1:2] "get(.x)=1" "get(.x)=2"
$ std.err : num [1:206] 0.0127 0.0147 0.0181 0.0197 0.0211 ...
$ upper : num [1:206] 1 0.999 0.991 0.987 0.982 ...
$ lower : num [1:206] 0.954 0.943 0.923 0.913 0.904 ...
$ conf.type: chr "log"
$ conf.int : num 0.95
$ call : language survfit(formula = Surv(time, status) ~ get(.x), data = lung)
- attr(*, "class")= chr "survfit"
, , strata "names" -attribute, get( - , , ggsurvplot. attr<-, - ( less- "language-y" ).
attr(l[['sex']][['strata']], "names") <- c("sex=1", "sex=2")
"call" -leaf, - . , , "call" leaf from the first fit`-object yoiu:
l$sex$call <- fit$call
ggsurvplot(l$sex,
conf.int = TRUE,
risk.table.col = "strata",
palette = c("#E7B800", "#2E9FDF"),
xlim = c(0, 600))
