plotCalendarTimeSpans: Plot the calendar time ranges spanned by each observation...

View source: R/Plots.R

plotCalendarTimeSpansR Documentation

Plot the calendar time ranges spanned by each observation period.

Description

Plot the calendar time ranges spanned by each observation period.

Usage

plotCalendarTimeSpans(
  studyPopulation,
  maxPersons = 10000,
  title = NULL,
  fileName = NULL
)

Arguments

studyPopulation

An object created using the createStudyPopulation() function.

maxPersons

The maximum number of persons to plot. If there are more than this number of persons a random sample will be taken to avoid visual clutter.

title

Optional: the main title for the plot

fileName

Name of the file where the plot should be saved, for example 'plot.png'. See the function ggplot2::ggsave() for supported file formats.

Details

Plots a line per patient from their observation start to their observation end.

Value

A ggplot object. Use the ggplot2::ggsave() function to save to file in a different format.


OHDSI/SelfControlledCaseSeries documentation built on Sept. 7, 2024, 8:24 a.m.