Learn R Programming

groupedHyperframe (version 0.3.4)

summary.Surv: Summary Information of Surv Object

Description

The missing S3 method of the generic function summary for Surv object.

Usage

# S3 method for Surv
summary(object, ...)

Value

Function summary.Surv() returns a character

vector.

Arguments

object

a Surv object

...

additional parameters, currently of no use

See Also

Examples

Run this code
aml2 = survival::aml |>
 within.data.frame(expr = {
  os = survival::Surv(time = time, event = status)
  time = status = NULL
 })
summary(aml2$os)
summary(aml2)

heart2 = survival::heart |>
 within.data.frame(expr = {
  os = survival::Surv(time = start, time2 = stop, event = event)
  start = stop = event = NULL
 })
summary(heart2$os)
summary(heart2)

Run the code above in your browser using DataLab