Format the result of summariseOrphanCodes into a visual table.
tableOrphanCodes.Rd
Arguments
- result
A summarised result with results of the type "orphan_codes".
- 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
.- conceptId
If TRUE concept ids will be displayed.
- standard
If TRUE a column indicating if the code is standard will be displayed.
- vocabulary
If TRUE vocabulary id will be displayed.
- relationship
If TRUE relationship id will be displayed.
- groupColumns
Columns to use as group labels. Allowed columns are
cdm_name
and/orcodelist_name
.- settings
Vector with the settings columns to display.
- 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) {
cdm <- mockVocabRef("database")
codes <- getCandidateCodes(cdm = cdm,
keywords = "Musculoskeletal disorder",
domains = "Condition",
includeDescendants = FALSE)
orphan_codes <- summariseOrphanCodes(x = list("msk" = codes$concept_id),
cdm = cdm,
domains = "Condition",
standardConcept = "Standard",
searchInSynonyms = FALSE,
searchNonStandard = FALSE,
includeDescendants = TRUE,
includeAncestor = FALSE)
tableOrphanCodes(orphan_codes)
CDMConnector::cdmDisconnect(cdm)
}