Skip to contents

[Experimental]

Usage

tableCohortAttrition(
  result,
  type = "gt",
  header = "variable_name",
  groupColumn = c("cdm_name", "cohort_name"),
  hide = c("variable_level", "reason_id", "estimate_name")
)

Arguments

result

A summarised_result object. Output of summariseCohortAttrition().

type

Type of table. Check supported types with visOmopResults::tableType().

header

Columns to use as header. See options with tidyColumns(result).

groupColumn

Columns to group by. See options with tidyColumns(result).

hide

Columns to hide from the visualisation. See options with tidyColumns(result).

Value

A visual table.

Examples

# \donttest{
library(CohortCharacteristics)

cdm <- mockCohortCharacteristics()

result <- summariseCohortAttrition(cdm$cohort2)

tableCohortAttrition(result)
#> ! Results have not been suppressed.
Reason
Variable name
number_records number_subjects excluded_records excluded_subjects
PP_MOCK; cohort_1
Initial qualifying events 2 2 0 0
PP_MOCK; cohort_2
Initial qualifying events 5 5 0 0
PP_MOCK; cohort_3
Initial qualifying events 3 3 0 0
mockDisconnect(cdm) # }