
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.
Source: R/tableTopConceptCounts.R
tableTopConceptCounts.Rd
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.
Arguments
- result
A
summarised_result
object, typically returned bysummariseConceptIdCounts()
.- 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"
. UsevisOmopResults::tableType()
to see all supported formats.
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)
condition_occurrence
# }