visOmopTable | R Documentation |
<summarised_result>
object into a gt, flextable, or tibble objectThis function combines the functionalities of formatEstimateValue()
,
estimateName()
, formatHeader()
, and formatTable()
into a single function specifically for <summarised_result>
objects.
visOmopTable(
result,
estimateName = character(),
header = character(),
settingsColumns = character(),
groupColumn = character(),
rename = character(),
type = "gt",
hide = character(),
showMinCellCount = TRUE,
.options = list(),
split = lifecycle::deprecated(),
excludeColumns = lifecycle::deprecated(),
formatEstimateName = lifecycle::deprecated(),
renameColumns = lifecycle::deprecated()
)
result |
A |
estimateName |
A named list of estimate names to join, sorted by
computation order. Use |
header |
A vector specifying the elements to include in the header. The order of elements matters, with the first being the topmost header. The input vector elements can be:
|
settingsColumns |
A character vector with the names of settings to include in the table. |
groupColumn |
Columns to use as group labels. By default, the name of the new group will be the tidy* column names separated by ";". To specify a custom group name, use a named list such as: list("newGroupName" = c("variable_name", "variable_level")). *tidy: The tidy format applied to column names replaces "_" with a space and
converts to sentence case. Use |
rename |
A named vector to customize column names, e.g., c("Database name" = "cdm_name"). The function renames all column names not specified here into a tidy* format. |
type |
The desired format of the output table. See |
hide |
Columns to drop from the output table. By default, |
showMinCellCount |
If |
.options |
A named list with additional formatting options.
|
split |
|
excludeColumns |
|
formatEstimateName |
|
renameColumns |
A tibble, gt, or flextable object.
result <- mockSummarisedResult()
result |>
visOmopTable(
estimateName = c("N%" = "<count> (<percentage>)",
"N" = "<count>",
"Mean (SD)" = "<mean> (<sd>)"),
header = c("group"),
rename = c("Database name" = "cdm_name"),
groupColumn = strataColumns(result)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.