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
)
result |
A summarised_result object. |
variableName |
The variable to plot it can be: "number subjects", "records per person", "duration" or "days to next observation period". |
plotType |
The plot type, it can be: "barplot", "boxplot" or "densityplot". |
facet |
Columns to colour by. See possible columns to colour by with:
|
colour |
Columns to colour by. See possible columns to colour by with:
|
A ggplot2 object.
cdm <- mockOmopSketch(numberIndividuals = 100)
result <- summariseObservationPeriod(cdm$observation_period)
result |>
plotObservationPeriod(
variableName = "Duration in days",
plotType = "boxplot"
)
PatientProfiles::mockDisconnect(cdm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.