Generate a custom ggplot2 from a summarised_result object generated with summariseTreatment function.
Source:R/plots.R
plotTreatment.Rd
Generate a custom ggplot2 from a summarised_result object generated with summariseTreatment function.
Usage
plotTreatment(
result,
facet = cdm_name + cohort_name ~ window_name,
colour = "variable_level"
)
Examples
if (FALSE) { # \dontrun{
library(DrugUtilisation)
cdm <- mockDrugUtilisation()
result <- cdm$cohort1 |>
summariseTreatment(
treatmentCohortName = "cohort2",
window = list(c(0, 30), c(31, 365))
)
plotTreatment(result)
} # }