plotIndication | R Documentation |
Generate a plot visualisation (ggplot2) from the output of summariseIndication
plotIndication(
result,
facet = cdm_name + cohort_name ~ window_name,
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
library(DrugUtilisation)
library(CDMConnector)
cdm <- mockDrugUtilisation()
indications <- list(headache = 378253, asthma = 317009)
cdm <- generateConceptCohortSet(cdm = cdm,
conceptSet = indications,
name = "indication_cohorts")
cdm <- generateIngredientCohortSet(cdm = cdm,
name = "drug_cohort",
ingredient = "acetaminophen")
result <- cdm$drug_cohort |>
summariseIndication(
indicationCohortName = "indication_cohorts",
unknownIndicationTable = "condition_occurrence",
indicationWindow = list(c(-Inf, 0), c(-365, 0))
)
plotIndication(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.