surv_summary {survminer}R Documentation

Nice Summary of a Survival Curve

Description

Compared to the default summary() function, surv_summary() creates a data frame containing a nice summary from survfit results.

Usage

surv_summary(x, data = NULL)

Arguments

x

an object of class survfit.

data

a dataset used to fit survival curves. If not supplied then data will be extracted from 'fit' object.

Value

An object of class 'surv_summary', which is a data frame with the following columns:

In a situation, where survival curves have been fitted with one or more variables, surv_summary object contains extra columns representing the variables. This makes it possible to facet the output of ggsurvplot by strata or by some combinations of factors.

surv_summary object has also an attribut named 'table' containing information about the survival curves, including medians of survival with confidence intervals, as well as, the total number of subjects and the number of event in each curve.

Author(s)

Alboukadel Kassambara, alboukadel.kassambara@gmail.com

Examples


# Fit survival curves
require("survival")
fit <- survfit(Surv(time, status) ~ rx + adhere, data = colon)

# Summarize
res.sum <- surv_summary(fit, data = colon)
head(res.sum)

# Information about the survival curves
attr(res.sum, "table")



[Package survminer version 0.4.9 Index]