plotTreatment {DrugUtilisation} | R Documentation |
Generate a custom ggplot2 from a summarised_result object generated with summariseTreatment function.
Description
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"
)
Arguments
result |
A summarised_result object. |
facet |
Columns to facet by. See options with
|
colour |
Columns to color by. See options with
|
Value
A ggplot2 object.
Examples
## Not run:
library(DrugUtilisation)
cdm <- mockDrugUtilisation()
result <- cdm$cohort1 |>
summariseTreatment(
treatmentCohortName = "cohort2",
window = list(c(0, 30), c(31, 365))
)
plotTreatment(result)
## End(Not run)
[Package DrugUtilisation version 1.0.4 Index]