tableIndication {DrugUtilisation}R Documentation

Create a table showing indication results

Description

[Experimental]

Usage

tableIndication(
  result,
  header = c("group", "strata"),
  splitStrata = TRUE,
  cohortName = TRUE,
  cdmName = TRUE,
  groupColumn = "variable_name",
  type = "gt",
  .options = list()
)

Arguments

result

A summarised_result created by summariseIndication().

header

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

splitStrata

If TRUE strata columns will be split.

cohortName

If TRUE cohort names will be displayed.

cdmName

If TRUE database names will be displayed.

groupColumn

Column to use as group labels.

type

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

.options

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

Value

A table with a formatted version of summariseIndication() results.

Examples



library(DrugUtilisation)

cdm <- mockDrugUtilisation()

result <- cdm$cohort1 |>
  summariseIndication(
    indicationCohortName = "cohort2",
    indicationWindow = list(c(-30, 0)),
    unknownIndicationTable = "condition_occurrence"
  )

tableIndication(result, type = "tibble")



[Package DrugUtilisation version 0.7.0 Index]