Skip to contents

Create a visual table from a summariseConceptIdCounts() result

Usage

tableConceptIdCounts(result, display = "overall", type = "reactable")

Arguments

result

A summarised_result object (output of summariseConceptIdCounts()).

display

A character string indicating which subset of the data to display. Options are:

  • "overall": Show all source and standard concepts.

  • "standard": Show only standard concepts.

  • "source": Show only source codes.

  • "missing standard": Show only source codes that are missing a mapped standard concept.

type

Type of formatting output table, either "reactable" or "datatable".

Value

A formatted table visualisation.

Examples

# \donttest{
library(OmopSketch)
library(omock)

cdm <- mockCdmFromDataset(datasetName = "GiBleed", source = "duckdb")
#>  Loading bundled GiBleed tables from package data.
#>  Adding drug_strength table.
#>  Creating local <cdm_reference> object.
#>  Inserting <cdm_reference> into duckdb.
#> duckdb keeps downloaded extensions and secrets in a temporary directory:
#>  /tmp/RtmpHDb1h0/duckdb
#> This is removed when the R session ends.
#>  Extensions are re-downloaded each session.
#>  Secrets are lost.
#>  Run duckdb(shared_home = TRUE) (or create ~/.duckdb) to keep them (suitable for most users).
#>  Run duckdb(shared_home = FALSE) to accept the temporary directory (and silence this message).
#>  See ?duckdb_storage for details and alternatives.

result <- summariseConceptIdCounts(cdm = cdm, omopTableName = "condition_occurrence")
tableConceptIdCounts(result = result, display = "standard")
cdmDisconnect(cdm = cdm) # }