tableTopConceptCounts {OmopSketch} | R Documentation |
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")
Arguments
result |
A |
top |
Integer. The number of top concepts to display. Defaults to |
countBy |
Either 'person' or 'record'. If NULL whatever is in the data is used. |
type |
Character. The output table format. Defaults to |
Value
A formatted table object displaying the top concepts from the summarised data.
Examples
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)
[Package OmopSketch version 0.5.1 Index]