Skip to contents

[Deprecated]

Usage

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

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().

Value

A plot visualisation.

Examples

# \donttest{
library(dplyr)
#> 
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#> 
#>     filter, lag
#> The following objects are masked from ‘package:base’:
#> 
#>     intersect, setdiff, setequal, union
library(OmopSketch)
library(omock)

cdm <- mockCdmFromDataset(datasetName = "GiBleed", source = "duckdb")
#>  Loading bundled GiBleed tables from package data.
#>  Adding drug_strength table.
#>  Creating local <cdm_reference> object.
#>  Inserting <cdm_reference> into duckdb.
#> duckdb keeps downloaded extensions and secrets in a temporary directory:
#>  /tmp/RtmpHDb1h0/duckdb
#> This is removed when the R session ends.
#>  Extensions are re-downloaded each session.
#>  Secrets are lost.
#>  Run duckdb(shared_home = TRUE) (or create ~/.duckdb) to keep them (suitable for most users).
#>  Run duckdb(shared_home = FALSE) to accept the temporary directory (and silence this message).
#>  See ?duckdb_storage for details and alternatives.

result <- summariseConceptSetCounts(
  cdm = cdm,
  conceptSet = list(
    "asthma" = c(4051466, 317009),
    "rhinitis" = c(4280726, 4048171, 40486433)
  )
)
#> Warning: `summariseConceptSetCounts()` was deprecated in OmopSketch 0.5.0.
#> Warning: ! `codelist` cast to integers.
#>  Searching concepts from domain condition in condition_occurrence.
#>  Counting concepts

result |>
  filter(variable_name == "Number subjects") |>
  plotConceptSetCounts(
    facet = "codelist_name",
    colour = "standard_concept_name"
  )
#> Warning: `plotConceptSetCounts()` was deprecated in OmopSketch 0.5.0.


cdmDisconnect(cdm = cdm)
# }