plotExposureCentered: Plot information centered around the start of exposure

View source: R/Plots.R

plotExposureCenteredR Documentation

Plot information centered around the start of exposure

Description

Plot information centered around the start of exposure

Usage

plotExposureCentered(
  studyPopulation,
  sccsData,
  exposureEraId = NULL,
  highlightExposedEvents = TRUE,
  title = NULL,
  fileName = NULL
)

Arguments

studyPopulation

An object created using the createStudyPopulation() function.

sccsData

An object of type SccsData as created using the getDbSccsData function.

exposureEraId

The exposure to create the era data for. If not specified it is assumed to be the one exposure for which the data was loaded from the database.

highlightExposedEvents

Highlight events that occurred during the exposure era using a different color?

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

This plot shows the number of events and the number of subjects under observation in week-sized intervals relative to the start of the first exposure.

Value

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


OHDSI/SelfControlledCaseSeries documentation built on Jan. 31, 2024, 7:30 p.m.