plotObservationPeriod {OmopSketch} | R Documentation |
Create a plot from the output of summariseObservationPeriod().
Description
Create a plot from the output of summariseObservationPeriod().
Usage
plotObservationPeriod(
result,
variableName = "Number subjects",
plotType = "barplot",
facet = NULL,
colour = NULL
)
Arguments
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:
|
Value
A ggplot2 object.
Examples
cdm <- mockOmopSketch(numberIndividuals = 100)
result <- summariseObservationPeriod(observationPeriod = cdm$observation_period)
plotObservationPeriod(result = result,
variableName = "Duration in days",
plotType = "boxplot"
)
PatientProfiles::mockDisconnect(cdm)
[Package OmopSketch version 0.5.1 Index]