Description Usage Arguments Value
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:
add unit tests
explain the time intervals and how they are used (ie, improve documentation)
Note that if there is any missingness in the exp.start or exp.end variables, then this assumes no exposure.
1 | events.in.interval(exp.start, exp.end, events)
|
exp.start |
the start of the exposure window |
exp.end |
the end of the exposure window |
events |
the time of the events |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.