Function that creates an eventAperture an opening where an event can occur relative to the index event

duringInterval(
  startWindow,
  endWindow = NULL,
  restrictVisit = FALSE,
  ignoreObservationPeriod = FALSE
)

Arguments

startWindow

the starting window where an event can occur

endWindow

the end window of where an event can occur. This parameter is optional

restrictVisit

a logical toggle specifying whether the event should occur on the same visit

ignoreObservationPeriod

a logical toggle specifying whether we can consider events outside the observation period

Value

An event aperture that can be used in a Capr cohort definition