
Format the result of summariseOrphanCodes into a table.
tableOrphanCodes.Rd
Format the result of summariseOrphanCodes into a table.
Arguments
- result
A summarised result with results of the type "orphan_codes".
- type
Type of desired formatted table. To see supported formats use visOmopResults::tableType()
- header
A vector specifying the elements to include in the header. The order of elements matters, with the first being the topmost header. The header vector can contain one of the following variables: "cdm_name", "codelist_name", "domain_id", "standard_concept_name", "standard_concept_id", "estimate_name", "standard_concept", "vocabulary_id". Alternatively, it can include other names to use as overall header labels.
- groupColumn
Variables to use as group labels. Allowed columns are: "cdm_name", "codelist_name", "domain_id", "standard_concept_name", "standard_concept_id", "estimate_name", "standard_concept", "vocabulary_id". These cannot be used in header.
- hide
Table columns to exclude, options are: "cdm_name", "codelist_name", "domain_id", "standard_concept_name", "standard_concept_id", "estimate_name", "standard_concept", "vocabulary_id". These cannot be used in header or groupColumn.
- .options
Named list with additional formatting options. visOmopResults::tableOptions() shows allowed arguments and their default values.
Examples
# \donttest{
cdm <- mockVocabRef("database")
#> Warning: There are observation period end dates after the current date: 2025-02-19
#> ℹ The latest max observation period end date found is 2025-12-31
#> Warning: There are observation period end dates after the current date: 2025-02-19
#> ℹ The latest max observation period end date found is 2025-12-31
codes <- getCandidateCodes(cdm = cdm,
keywords = "Musculoskeletal disorder",
domains = "Condition",
includeDescendants = FALSE)
#> Limiting to domains of interest
#> Getting concepts to include
#> Search completed. Finishing up.
#> ✔ 1 candidate concept identified
#> Time taken: 0 minutes and 0 seconds
orphan_codes <- summariseOrphanCodes(x = list("msk" = codes$concept_id),
cdm = cdm)
#> PHOEBE results not available
#> ℹ The concept_recommended table is not present in the cdm.
#> Getting orphan codes for msk
#>
tableOrphanCodes(orphan_codes)
CDMConnector::cdmDisconnect(cdm)
# }