powered by
Generate a custom ggplot2 from a summarised_result object generated with summariseTreatment function.
plotTreatment( result, facet = cdm_name + cohort_name ~ window_name, colour = "variable_level" )
A ggplot2 object.
A summarised_result object.
Columns to facet by. See options with availablePlotColumns(result). Formula is also allowed to specify rows and columns.
availablePlotColumns(result)
Columns to color by. See options with availablePlotColumns(result).
if (FALSE) { cdm <- mockDrugUtilisation() result <- cdm$cohort1 |> summariseTreatment( treatmentCohortName = "cohort2", window = list(c(0, 30), c(31, 365)) ) plotTreatment(result) }
Run the code above in your browser using DataLab