View source: R/plotComparedLargeScaleCharacteristics.R
| plotComparedLargeScaleCharacteristics | R Documentation |
plotComparedLargeScaleCharacteristics(
result,
colour,
reference = NULL,
facet = NULL,
missings = 0
)
result |
A summarised_result object. |
colour |
Columns to color by. See options with
|
reference |
A named character to set up the reference. It must be one of the levels of reference. |
facet |
Columns to facet by. See options with
|
missings |
Value to replace the missing value with. If NULL missing values will be eliminated. |
A ggplot.
## Not run:
library(CohortCharacteristics)
library(DrugUtilisation)
library(plotly, warn.conflicts = FALSE)
cdm <- mockCdmFromDataset(datasetName = "GiBleed", source = "duckdb")
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 |>
plotComparedLargeScaleCharacteristics(
colour = "variable_level",
reference = "-365 to -1",
missings = NULL
) |>
ggplotly()
cdmDisconnect(cdm)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.