View source: R/plotObservationPeriod.R
| plotObservationPeriod | R Documentation |
Create a plot from the output of summariseObservationPeriod()
plotObservationPeriod(
result,
variableName = "Number subjects",
plotType = "barplot",
facet = NULL,
colour = NULL,
style = NULL,
type = NULL
)
result |
A summarised_result object (output of
|
variableName |
The variable to plot it can be: "Number subjects", "Records per person", "Duration in days" or "Days to next observation period". |
plotType |
The plot type, it can be: "barplot", "boxplot", "densityplot" or "cumulativeplot". |
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(OmopSketch)
library(dplyr, warn.conflicts = FALSE)
library(omock)
cdm <- mockCdmFromDataset(datasetName = "GiBleed", source = "duckdb")
result <- summariseObservationPeriod(cdm = cdm)
tableObservationPeriod(result = result)
plotObservationPeriod(
result = result,
variableName = "Duration in days",
plotType = "boxplot"
)
cdmDisconnect(cdm = cdm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.