
Create a visual table from a summariseConceptIdCounts() result
Source:R/tableConceptIdCounts.R
tableConceptIdCounts.RdCreate a visual table from a summariseConceptIdCounts() result
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".
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)
# }