| plotTrend | R Documentation |
Create a ggplot2 plot from the output of summariseTrend()
plotTrend(
result,
output = NULL,
facet = "type",
colour = NULL,
style = NULL,
type = NULL
)
result |
A summarised_result object (output of |
output |
The output to plot. Accepted values are:
|
facet |
Columns to face by. Formula format can be provided. See possible
columns to face by with: |
colour |
Columns to colour by. See possible columns to colour by with:
|
style |
Visual theme to apply. Character, or |
type |
Character string indicating the output plot format. See
|
A plot visualisation.
library(dplyr)
library(OmopSketch)
library(omock)
cdm <- mockCdmFromDataset(datasetName = "GiBleed", source = "duckdb")
result <- summariseTrend(cdm,
episode = "observation_period",
output = c("person-days", "record"),
interval = "years",
ageGroup = list("<=40" = c(0, 40), ">40" = c(41, Inf)),
sex = TRUE
)
plotTrend(
result = result,
output = "record",
colour = "sex",
facet = "age_group"
)
cdmDisconnect(cdm = cdm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.