Description Usage Arguments Value Examples
create multiple survival curves for multiple endpoints, stratifications and groupings
1 2 3 |
data |
the data |
surv |
the |
strata |
stratifying variable |
glist |
a grouping list, or the name of a grouping variable in 'data' |
w |
weight or name of variable that provides weights |
prefix |
prefix values for times and events |
progress |
primitive displayer of progress |
stringsAsFactors |
logical, if TRUE will keep ordering of ingoing stuff |
A tbl_df
with an rbind
ed broom::tidy
'd
survival::survfit
ed version of all the combinations of
'strata' and 'glist' for each 'surv'. That is a crap
explanation...
1 2 3 4 5 6 7 8 9 10 11 12 | n = 1200
df <- data.frame(
t.foo = abs(rnorm(n, 10, 2)),
ev.foo = rbinom(n, 1, 0.2),
t.bar = abs(rnorm(n, 10, 3)),
ev.bar = rbinom(n, 1, 0.3),
strutt = sample(letters[1:2], n, TRUE),
gsak = sample(LETTERS[4:7], n, TRUE),
wait = .5 + abs(rnorm(n, 0, 1))
)
surv_curv(data = df, surv = c("foo", "bar"), w = "wait",
strata = "strutt", glist = "gsak")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.