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", settingsColumns(result))
)

Arguments

result

A summarised_result object.

type

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

header

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

groupColumn

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

hide

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

Value

A formatted table.

Examples

# \donttest{
library(CohortCharacteristics)

cdm <- mockCohortCharacteristics()

result <- summariseCohortAttrition(cdm$cohort2)

tableCohortAttrition(result)
#> `result_id` is not present in result.
#> `result_id` is not present in result.
#> `result_id` is not present in result.
Reason
Variable name
number_records number_subjects excluded_records excluded_subjects
PP_MOCK; cohort_1
Initial qualifying events 3 3 0 0
PP_MOCK; cohort_2
Initial qualifying events 3 3 0 0
PP_MOCK; cohort_3
Initial qualifying events 4 4 0 0
mockDisconnect(cdm) # }