tableCohortOverlap {CohortCharacteristics}R Documentation

Format a summariseOverlapCohort result into a visual table.

Description

'r lifecycle::badge("experimental")'

Usage

tableCohortOverlap(
  result,
  type = "gt",
  formatEstimateName = c(`N (%)` = "<count> (<percentage>%)"),
  header = c("strata"),
  split = c("group", "strata", "additional"),
  groupColumn = NULL,
  excludeColumns = c("result_id", "estimate_type"),
  .options = list()
)

Arguments

result

A summariseOverlapCohort result.

type

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

formatEstimateName

Named list of estimate name's to join, sorted by computation order. Indicate estimate_name's between <...>.

header

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

split

A vector containing the name-level groups to split ("group", "strata", "additional"), or an empty character vector to not split.

groupColumn

Column to use as group labels.

excludeColumns

Columns to drop from the output table.

.options

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

Value

A formatted table of the summariseOverlapCohort result.

Examples


library(CohortCharacteristics)
cdm <- CohortCharacteristics::mockCohortCharacteristics()
overlap <- summariseCohortOverlap(cdm$cohort2)
tableCohortOverlap(overlap)
CDMConnector::cdmDisconnect(cdm = cdm)



[Package CohortCharacteristics version 0.2.0 Index]