Learn R Programming

OmopSketch (version 0.5.1)

plotConceptSetCounts: Plot the concept counts of a summariseConceptSetCounts output.

Description

Plot the concept counts of a summariseConceptSetCounts output.

Usage

plotConceptSetCounts(result, facet = NULL, colour = NULL)

Value

A ggplot2 object showing the concept counts.

Arguments

result

A summarised_result object (output of summariseConceptSetCounts).

facet

Columns to face by. Formula format can be provided. See possible columns to face by with: visOmopResults::tidyColumns().

colour

Columns to colour by. See possible columns to colour by with: visOmopResults::tidyColumns().

Examples

Run this code
# \donttest{
library(dplyr)

cdm <- mockOmopSketch()

result <- summariseConceptSetCounts(
  cdm = cdm,
  conceptSet = list(
    "asthma" = c(4051466, 317009) ,
    "rhinitis" = c(4280726, 4048171, 40486433)
  )
)

result |>
  filter(variable_name == "Number subjects") |>
  plotConceptSetCounts(facet = "codelist_name", colour = "standard_concept_name")

PatientProfiles::mockDisconnect(cdm)
# }

Run the code above in your browser using DataLab