Format the result of summariseCodeUse into a visual table.
tableCodeUse.Rd
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:
cdm_name
,group
,strata
,additional
,variable
,estimate
,settings
.- 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
cdm_name
and/orcodelist_name
.- excludeColumns
Columns to drop from the output table.
- .options
Named list with additional formatting options. visOmopResults::optionsVisOmopTable() shows allowed arguments and their default values.
Examples
if (FALSE) {
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)
}