tableAchillesCodeUse: Format the result of summariseAchillesCodeUse into a visual...

View source: R/tableAchillesCodeUse.R

tableAchillesCodeUseR Documentation

Format the result of summariseAchillesCodeUse into a visual table.

Description

[Experimental]

Usage

tableAchillesCodeUse(
  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 "achilles_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.

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 summariseCohortCodeUse result.

Examples

## Not run: 
cdm <- mockVocabRef("database")
oa <- getCandidateCodes(cdm = cdm, keywords = "osteoarthritis")
result_achilles <- summariseAchillesCodeUse(list(oa = oa$concept_id), cdm = cdm)
tableAchillesCodeUse(result_achilles)
CDMConnector::cdmDisconnect(cdm)

## End(Not run)


oxford-pharmacoepi/CodelistGenerator documentation built on May 13, 2024, 2:03 a.m.