plotDrugRestart | R Documentation |
Generate a custom ggplot2 from a summarised_result object generated with summariseDrugRestart() function.
plotDrugRestart(
result,
facet = cdm_name + cohort_name ~ follow_up_days,
colour = "variable_level"
)
result |
A summarised_result object. |
facet |
Columns to facet by. See options with
|
colour |
Columns to color by. See options with
|
A ggplot2 object.
## Not run:
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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.