View source: R/plotLargeScaleCharacteristics.R
plotLargeScaleCharacteristics | R Documentation |
plotLargeScaleCharacteristics(
result,
facet = c("cdm_name", "cohort_name"),
colour = "variable_level"
)
result |
A summarised_result object. Output of summariseLargeScaleCharacteristics(). |
facet |
Columns to facet by. See options with |
colour |
Columns to color by. See options with |
A ggplot2 object.
## Not run:
library(CohortCharacteristics)
library(duckdb)
library(CDMConnector)
library(DrugUtilisation)
con <- dbConnect(duckdb(), eunomiaDir())
cdm <- cdmFromCon(con, cdmSchem = "main", writeSchema = "main")
cdm <- generateIngredientCohortSet(
cdm = cdm, name = "my_cohort", ingredient = "acetaminophen"
)
resultsLsc <- cdm$my_cohort |>
summariseLargeScaleCharacteristics(
window = list(c(-365, -1), c(1, 365)),
eventInWindow = "condition_occurrence"
)
resultsLsc |>
plotLargeScaleCharacteristics(
facet = c("cdm_name", "cohort_name"),
colour = "variable_level"
)
cdmDisconnect(cdm)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.