Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


DrugUtilisation (version 1.0.1)

tableDrugRestart: Format a drug_restart object into a visual table.

Description

Format a drug_restart object into a visual table.

Usage

tableDrugRestart(
  result,
  header = c("cdm_name", "cohort_name"),
  groupColumn = "variable_name",
  type = "gt",
  hide = c("censor_date", "restrict_to_first_discontinuation", "follow_up_days",
    "cohort_table_name", "incident", "switch_cohort_table"),
  .options = list()
)

Value

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

Arguments

result

A summarised_result object.

header

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

groupColumn

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

type

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

hide

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

.options

A named list with additional formatting options. visOmopResults::tableOptions() shows allowed arguments and their default values.

Examples

Run this code
# \donttest{
cdm <- mockDrugUtilisation()

conceptlist <- list("a" = 1125360, "b" = c(1503297, 1503327))
cdm <- generateDrugUtilisationCohortSet(
  cdm = cdm,
  name = "switch_cohort",
  conceptSet = conceptlist
)

result <- cdm$cohort1 |>
  summariseDrugRestart(switchCohortTable = "switch_cohort")

tableDrugRestart(result)
# }

Run the code above in your browser using DataLab