tableCodeUse {CodelistGenerator} | R Documentation |
Format the result of summariseCodeUse into a table.
Description
Format the result of summariseCodeUse into a table.
Usage
tableCodeUse(
result,
type = "gt",
header = c("cdm_name", "estimate"),
splitStrata = TRUE,
conceptId = TRUE,
sourceConcept = TRUE,
groupColumns = NULL,
excludeColumns = c("result_id", "estimate_type", "additional_name", "additional_level"),
.options = list()
)
Arguments
result |
A summarised result with results of the type "code_use". |
type |
Type of desired formatted table, possibilities: "gt", "flextable", "tibble". |
header |
A vector containing which elements should go into the header
in order. Allowed are: |
splitStrata |
If TRUE strata will be split. |
conceptId |
If TRUE concept ids will be displayed. |
sourceConcept |
If TRUE source concepts will be displayed. |
groupColumns |
Columns to use as group labels. Allowed columns are
|
excludeColumns |
Columns to drop from the output table. |
.options |
Named list with additional formatting options. visOmopResults::optionsVisOmopTable() shows allowed arguments and their default values. |
Value
A table with a formatted version of the summariseCodeUse result.
Examples
## Not run:
con <- DBI::dbConnect(duckdb::duckdb(),
dbdir = CDMConnector::eunomia_dir())
cdm <- CDMConnector::cdm_from_con(con,
cdm_schem = "main",
write_schema = "main")
acetiminophen <- c(1125315, 1127433, 40229134,
40231925, 40162522, 19133768, 1127078)
poliovirus_vaccine <- c(40213160)
cs <- list(acetiminophen = acetiminophen,
poliovirus_vaccine = poliovirus_vaccine)
results <- summariseCodeUse(cs,cdm = cdm)
tableCodeUse(results)
CDMConnector::cdmDisconnect(cdm)
## End(Not run)