fortify.survfit: Convert 'survival::survfit' to 'data.frame'

Description Usage Arguments Value Examples

Description

Convert survival::survfit to data.frame

Usage

1
2
3
## S3 method for class 'survfit'
fortify(model, data = NULL, surv.connect = FALSE,
  fun = NULL, ...)

Arguments

model

survival::survfit instance

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

Value

data.frame

Examples

1
2
3
4
5
library(survival)
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)))


Search within the ggfortify package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.