View source: R/tableSurvival.R
riskTable | R Documentation |
Table with survival events
riskTable(
x,
eventGap = NULL,
header = c("estimate"),
type = "gt",
groupColumn = NULL,
.options = list()
)
x |
Result from estimateSingleEventSurvival or estimateCompetingRiskSurvival. |
eventGap |
Event gap defining the times at which to report the risk table information. Must be one of the eventGap inputs used for the estimation function. If NULL, all available are reported. |
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. |
A tibble containing the risk table information (n_risk, n_events, n_censor) for all times within the event gap specified.
cdm <- mockMGUS2cdm()
surv <- estimateSingleEventSurvival(cdm,
targetCohortTable = "mgus_diagnosis",
outcomeCohortTable = "death_cohort")
riskTable(surv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.