| as.data.frame.survfitr | R Documentation |
Returns the estimated curves in long ("tidy") format, one row per distinct event time (and group), ready for further processing or plotting.
## S3 method for class 'survfitr'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
x |
a |
row.names, optional |
see |
... |
ignored. |
A data frame with columns group (only when the fit has
strata), time, n.event, n.risk, surv and std.error (NA
for estimators without standard errors).
data(MMC)
fit <- survfitr(Survr(id, time, event) ~ group,
data = MMC,
type = "wang-chang"
)
head(as.data.frame(fit))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.