Table of incidence results
tableIncidence.Rd
Table of incidence results
Usage
tableIncidence(
result,
type = "gt",
header = c("estimate_name"),
groupColumn = character(),
settingsColumn = omopgenerics::settingsColumns(result),
hide = character(),
.options = list(),
settingsColumns = lifecycle::deprecated()
)
Arguments
- result
Incidence results
- type
Type of table. Can be "gt", "flextable", or "tibble"
- header
A vector specifying the elements to include in the header. The order of elements matters, with the first being the topmost header. The header vector can contain one of the following variables: "cdm_name", "denominator_cohort_name", "outcome_cohort_name", "incidence_start_date", "incidence_end_date", "estimate_name", variables in the
strata_name
column, and any of the settings columns specified insettingsColumn
argument. The header can also include other names to use as overall header labels- groupColumn
Variables to use as group labels. Allowed columns are the same as in
header
- settingsColumn
Variables from the settings atribute to dispaly in the table
- hide
Table columns to exclude, options are the ones described in
header
- .options
Table options to apply
- settingsColumns
Examples
# \donttest{
cdm <- mockIncidencePrevalence(sampleSize = 1000)
cdm <- generateDenominatorCohortSet(
cdm = cdm, name = "denominator",
cohortDateRange = c(as.Date("2008-01-01"), as.Date("2018-01-01"))
)
#> ℹ Creating denominator cohorts
#> ✔ Cohorts created in 0 min and 3 sec
inc <- estimateIncidence(
cdm = cdm,
denominatorTable = "denominator",
outcomeTable = "outcome"
)
#> Getting incidence for analysis 1 of 1
#> Overall time taken: 0 mins and 1 secs
tableIncidence(inc)
# }