Skip to contents

Format a dose_coverage object into a visual table.

Usage

tableDoseCoverage(
  result,
  header = c("variable_name", "estimate_name"),
  groupColumn = c("cdm_name", "ingredient_name"),
  type = "gt",
  hide = c("variable_level", "sample_size"),
  .options = list()
)

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.

Value

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

Examples

# \donttest{
library(DrugUtilisation)

cdm <- mockDrugUtilisation()

result <- summariseDoseCoverage(cdm, 1125315)
#>  The following estimates will be computed:
#>  daily_dose: count_missing, percentage_missing, mean, sd, q25, median, q75
#> ! Table is collected to memory as not all requested estimates are supported on
#>   the database side
#> → Start summary of data, at 2025-05-13 22:20:05.616248
#>  Summary finished, at 2025-05-13 22:20:06.042321

tableDoseCoverage(result)
Variable name
number records
Missing dose
daily_dose
Unit Route Pattern id
Estimate name
N N (%) Mean (SD) Median (Q25 - Q75)
DUS MOCK; acetaminophen
overall overall overall 6 0 (0.00 %) 433.93 (941.85) 40.09 (12.91 - 131.21)
milligram overall overall 6 0 (0.00 %) 433.93 (941.85) 40.09 (12.91 - 131.21)
oral overall 3 0 (0.00 %) 839.46 (1,312.99) 160.00 (82.72 - 1,256.47)
topical overall 3 0 (0.00 %) 28.41 (20.78) 35.34 (20.19 - 40.09)
oral 9 3 0 (0.00 %) 839.46 (1,312.99) 160.00 (82.72 - 1,256.47)
topical 9 3 0 (0.00 %) 28.41 (20.78) 35.34 (20.19 - 40.09)
# }