events.in.interval: compute whether or not events fell in a given interval

Description Usage Arguments Value

Description

given the boundaries of a time period and a vector of event times, this fn returns the count of events that happened within the time period. so, given a time period
[exp.start, exp.end)
and events
(event1, event2, ...)
this function returns a vector with 1's corresponding to events that took place in the time window and 0 otherwise TODO:

Note that if there is any missingness in the exp.start or exp.end variables, then this assumes no exposure.

Usage

1
  events.in.interval(exp.start, exp.end, events)

Arguments

exp.start

the start of the exposure window

exp.end

the end of the exposure window

events

the time of the events

Value

a vector of the same length of events; the entries are 1 for each event that occurred in the given time window and 0 otherwise


dfeehan/dhstools documentation built on May 15, 2019, 5:12 a.m.