fortify.survfit | R Documentation |
survival::survfit
to data.frame
Convert survival::survfit
to data.frame
## S3 method for class 'survfit'
fortify(model, data = NULL, surv.connect = FALSE, fun = NULL, ...)
model |
|
data |
original dataset, if needed |
surv.connect |
logical frag indicates whether connects survival curve to the origin |
fun |
an arbitrary function defining a transformation of the survival curve |
... |
other arguments passed to methods |
data.frame
## Not run:
if (requireNamespace("survival", quietly = TRUE)) {
fortify(survfit(Surv(time, status) ~ sex, data = lung))
fortify(survfit(Surv(time, status) ~ 1, data = lung))
fortify(survfit(coxph(Surv(time, status) ~ sex, data = lung)))
fortify(survfit(coxph(Surv(time, status) ~ 1, data = lung)))
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.