setGlobalTableOptions: Set format options for all subsequent tables

View source: R/helperFunctions.R

setGlobalTableOptionsR Documentation

Set format options for all subsequent tables

Description

Set format options for all subsequent tables unless state a different style in a specific function

Usage

setGlobalTableOptions(style = NULL, type = NULL)

Arguments

style

Named list that specifies how to style the different parts of the gt or flextable table generated. Accepted style entries are: title, subtitle, header, header_name, header_level, column_name, group_label, and body. Alternatively, use "default" to get visOmopResults style, or NULL for gt/flextable style. Keep in mind that styling code is different for gt and flextable. Additionally, "datatable" and "reactable" have their own style functions. To see style options for each table type use tableStyle().

type

The desired format of the output table. See tableType() for allowed options. If "tibble", no formatting will be applied.

Examples

setGlobalTableOptions(style = "darwin", type = "tinytable")
result <- mockSummarisedResult()
result |>
  visOmopTable(
    estimateName = c("N%" = "<count> (<percentage>)",
                     "N" = "<count>",
                     "Mean (SD)" = "<mean> (<sd>)"),
    header = c("cohort_name"),
    rename = c("Database name" = "cdm_name"),
    groupColumn = strataColumns(result)
  )


visOmopResults documentation built on Sept. 9, 2025, 5:42 p.m.