
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.- style
Named list that specifies how to style the different parts of the gt or flextable table generated. Accepted style entries are: title, subtitle, header, header_name, header_level, column_name, group_label, and body. Alternatively, use "default" to get visOmopResults style, or NULL for gt/flextable style. Keep in mind that styling code is different for gt and flextable. Additionally, "datatable" and "reactable" have their own style functions. To see style options for each table type use
visOmopResults::tableStyle()
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
# }