tableSurvival: Table with survival summary

View source: R/tableSurvival.R

tableSurvivalR Documentation

Table with survival summary

Description

Table with survival summary

Usage

tableSurvival(
  x,
  times = NULL,
  timeScale = "days",
  header = c("estimate"),
  type = "gt",
  groupColumn = NULL,
  .options = list()
)

Arguments

x

Result from estimateSingleEventSurvival or estimateCompetingRiskSurvival

times

Times at which to report survival in the summary table

timeScale

Time unit to report survival in: days, months or years

header

A vector containing which elements should go into the header. Allowed are: cdm_name, group, strata, additional, variable, estimate, and settings.

type

Type of desired formatted table, possibilities: "gt", "flextable", and "tibble".

groupColumn

Columns to use as group labels.

.options

Named list with additional formatting options. CohortSurvival::optionsTableSurvival() shows allowed arguments and their default values.

Value

A tibble containing a summary of observed survival in the required units

Examples


cdm <- mockMGUS2cdm()
surv <- estimateSingleEventSurvival(cdm,
                                    targetCohortTable = "mgus_diagnosis",
                                    outcomeCohortTable = "death_cohort")
tableSurvival(surv, times = c(50,100,365))


CohortSurvival documentation built on June 16, 2025, 5:10 p.m.