Skip to contents

Create a ggplot of the records' count trend.

Usage

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

Arguments

result

Output from 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 ggplot showing the table counts

Examples

# \donttest{
cdm <- mockOmopSketch()

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.


PatientProfiles::mockDisconnect(cdm = cdm)
# }