formatTable {visOmopResults}R Documentation

Format a summarised_result object into a gt, flextable or tibble object

Description

formatTable() was renamed to visOmopTable()

Usage

formatTable(
  result,
  formatEstimateName,
  header,
  split,
  groupColumn = NULL,
  type = "gt",
  renameColumns = NULL,
  minCellCount = lifecycle::deprecated(),
  excludeColumns = c("result_id", "estimate_type"),
  .options = list()
)

Arguments

result

A summarised_result.

formatEstimateName

Named list of estimate name's to join, sorted by computation order. Indicate estimate_name's between <...>.

header

A vector containing which elements should go into the header in order (cdm_name, group, strata, additional, variable, estimate, and settings).

split

A vector containing the name-level groups to split ("group", "strata", "additional"), or an empty character vector to not split.

groupColumn

Columns to use as group labels. By default the name of the new group will be the column names separated by "_". To specify a new grouping name enter a named list such as: list(newGroupName = c("variable_name", "variable_level"))

type

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

renameColumns

Named vector to customise column names, for instance: c("Database name" = "cdm_name")). By default column names are transformed to sentence case.

minCellCount

[Deprecated] Suppression of estimates when counts < minCellCount should be done before with ompogenerics::suppress().

excludeColumns

Columns to drop from the output table.

.options

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

Details

[Deprecated]

Value

A tibble, gt, or flextable object.

Examples

mockSummarisedResult() |> formatTable(
  formatEstimateName = c("N%" = "<count> (<percentage>)",
                         "N" = "<count>",
                         "Mean (SD)" = "<mean> (<sd>)"),
  header = c("group"),
  split = c("group","strata",  "additional")
)


[Package visOmopResults version 0.3.0 Index]