Generate a custom ggplot2 from a summarised_result object generated with summariseDrugRestart() function.
Source:R/plots.R
plotDrugRestart.Rd
Generate a custom ggplot2 from a summarised_result object generated with summariseDrugRestart() function.
Usage
plotDrugRestart(
result,
facet = cdm_name + cohort_name ~ follow_up_days,
colour = "variable_level"
)
Examples
if (FALSE) { # \dontrun{
library(DrugUtilisation)
cdm <- mockDrugUtilisation()
conceptlist <- list("a" = 1125360, "b" = c(1503297, 1503327))
cdm <- generateDrugUtilisationCohortSet(
cdm = cdm,
name = "switch_cohort",
conceptSet = conceptlist
)
result <- cdm$cohort1 |>
summariseDrugRestart(switchCohortTable = "switch_cohort")
plotDrugRestart(result)
} # }