Learn R Programming

visOmopResults (version 1.3.1)

setGlobalTableOptions: 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

A character string or custom R code to define the visual formatting of the table. This argument can be provided in two ways:

  1. Pre-defined Styles (Character String): Use a name for a built-in style (e.g., "darwin"). See tableStyle() for available options.

  2. Custom Code (Advanced): Supply a block of custom R code. This code must be specific to the table type. See tableStyleCode() for structural examples.

type

The desired format of the output table. See tableType() for allowed options.

Examples

Run this code
setGlobalTableOptions(style = "darwin", type = "tinytable")
result <- mockSummarisedResult()
result |>
  visOmopTable(
    estimateName = c("N%" = " ()",
                     "N" = "",
                     "Mean (SD)" = " ()"),
    header = c("cohort_name"),
    rename = c("Database name" = "cdm_name"),
    groupColumn = strataColumns(result)
  )
 # drop global options:
 setGlobalTableOptions(style = NULL, type = NULL)

Run the code above in your browser using DataLab