Plot information centered around the start of exposure

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.

Value

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

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.