survfit2df | R Documentation |
Extract survival data from an object of class "survfit"
survfit2df(fit, labels = NULL)
fit |
An object of class "survfit" |
labels |
Character |
A data.frame
library(survival)
data(cancer,package="survival")
fit=survfit(coxph(Surv(time,status)~sex+age+strata(rx),data=colon))
survfit2df(fit)
## Not run:
fit=coxph(Surv(time,status)~sex+age+strata(rx),data=colon)
fit=survfit(as.formula(deparse(fit$terms)),data=fit2model(fit))
survfit2df(fit)
fit=survfit(Surv(time,status)~rx+sex+age,data=colon)
survfit2df(fit)
fit=survfit(Surv(time,status)~1,data=colon)
survfit2df(fit)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.