Skip to contents

[Deprecated]

Usage

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

Arguments

result

A summarised_result object (output of summariseRecordCount()).

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(omock)
library(OmopSketch)

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.

summarisedResult <- summariseRecordCount(
  cdm = cdm,
  omopTableName = "condition_occurrence",
  ageGroup = list("<=20" = c(0, 20), ">20" = c(21, Inf)),
  sex = TRUE
)
#> Warning: `summariseRecordCount()` was deprecated in OmopSketch 1.0.0.
#>  Please use `summariseTrend()` instead.

plotRecordCount(
  result = summarisedResult,
  colour = "age_group",
  facet = sex ~ .
)
#> Warning: `plotRecordCount()` was deprecated in OmopSketch 1.0.0.
#>  Please use `plotTrend()` instead.


cdmDisconnect(cdm = cdm)
# }