Skip to contents

Create a visual table of the most common concepts from summariseConceptIdCounts() output. This function takes a summarised_result object and generates a formatted table highlighting the most frequent concepts.

Usage

tableTopConceptCounts(result, top = 10, countBy = NULL, type = "gt")

Arguments

result

A summarised_result object, typically returned by summariseConceptIdCounts().

top

Integer. The number of top concepts to display. Defaults to 10.

countBy

Either 'person' or 'record'. If NULL whatever is in the data is used.

type

Character. The output table format. Defaults to "gt". Use visOmopResults::tableType() to see all supported formats.

Value

A formatted table object displaying the top concepts from the summarised data.

Examples

# \donttest{
library(OmopSketch)
library(CDMConnector)
library(duckdb)

requireEunomia()
con <- dbConnect(drv = duckdb(dbdir = eunomiaDir()))
cdm <- cdmFromCon(con = con, cdmSchema = "main", writeSchema = "main")

result <- summariseConceptIdCounts(cdm = cdm, omopTableName = "condition_occurrence")

tableTopConceptCounts(result = result, top = 5)
Top
Cdm name
Synthea
condition_occurrence
1 Standard: Viral sinusitis (40481087)
Source: Viral sinusitis (40481087)
17268
2 Standard: Acute viral pharyngitis (4112343)
Source: Acute viral pharyngitis (4112343)
10217
3 Standard: Acute bronchitis (260139)
Source: Acute bronchitis (260139)
8184
4 Standard: Otitis media (372328)
Source: Otitis media (372328)
3605
5 Standard: Streptococcal sore throat (28060)
Source: Streptococcal sore throat (28060)
2656
# }