Learn R Programming

OmopSketch (version 0.5.1)

tableTopConceptCounts: 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.

Description

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")

Value

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

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.

Examples

Run this code
# \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)
# }

Run the code above in your browser using DataLab