tableOrphanCodes {CodelistGenerator}R Documentation

Format the result of summariseOrphanCodes into a table.

Description

Format the result of summariseOrphanCodes into a table.

Usage

tableOrphanCodes(
  result,
  type = "gt",
  header = c("cdm_name", "estimate"),
  conceptId = TRUE,
  standard = TRUE,
  vocabulary = TRUE,
  groupColumns = NULL,
  excludeColumns = c("result_id", "estimate_type"),
  .options = list()
)

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.

groupColumns

Columns to use as group labels. Allowed columns are cdm_name and/or codelist_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.

Value

A table with a formatted version of the summariseOrphanCodes result.

Examples

## Not run: 
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)

## End(Not run)


[Package CodelistGenerator version 3.1.0 Index]