Learn R Programming

DrugUtilisation (version 1.0.1)

plotProportionOfPatientsCovered: Plot proportion of patients covered

Description

Plot proportion of patients covered

Usage

plotProportionOfPatientsCovered(
  result,
  facet = "cohort_name",
  colour = strataColumns(result),
  ribbon = TRUE
)

Value

Plot of proportion Of patients covered over time

Arguments

result

A summarised_result object.

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

ribbon

Whether to plot a ribbon with the confidence intervals.

Examples

Run this code
# \donttest{
cdm <- mockDrugUtilisation()

cdm <- generateDrugUtilisationCohortSet(
  cdm = cdm,
  name = "my_cohort",
  conceptSet = list(drug_of_interest = c(1503297, 1503327))
)

result <- cdm$my_cohort |>
  summariseProportionOfPatientsCovered(followUpDays = 365)

plotProportionOfPatientsCovered(result)
# }

Run the code above in your browser using DataLab