Skip to contents

[Experimental]

Usage

plotCohortOverlap(
  result,
  uniqueCombinations = TRUE,
  facet = c("cdm_name", "cohort_name_reference"),
  colour = "variable_name",
  style = "default",
  .options = lifecycle::deprecated()
)

Arguments

result

A summarised_result object.

uniqueCombinations

Whether to restrict to unique reference and comparator comparisons.

facet

Columns to facet by. See options with availablePlotColumns(result). Formula is also allowed to specify rows and columns.

colour

Columns to color by. See options with availablePlotColumns(result).

style

Named list that specifies how to style the different parts of the table generated. It can either be a pre-defined style ("default" or "darwin" - the latter just for gt and flextable), NULL to get the table default style, or custom. Keep in mind that styling code is different for all table styles. To see the different styles see visOmopResults::tableStyle().

.options

deprecated.

Value

A ggplot.

Examples

# \donttest{
library(CohortCharacteristics)

cdm <- mockCohortCharacteristics()
#> Warning: There are observation period end dates after the current date: 2025-10-22
#>  The latest max observation period end date found is 2031-09-13

overlap <- summariseCohortOverlap(cdm$cohort2)

plotCohortOverlap(overlap, uniqueCombinations = FALSE)
#> Warning: Ignoring empty aesthetic: `width`.


# }