refvalIdxByDate: Compute indices of reference value using Date class

Description Usage Arguments Details Value

View source: R/algo_farrington.R

Description

The reference values are formed based on computations of seq for Date class arguments.

Usage

1
refvalIdxByDate(t0, b, w, epochStr, epochs)

Arguments

t0

A Date object describing the time point

b

Number of years to go back in time

w

Half width of window to include reference values for

epochStr

One of "1 month", "1 week" or "1 day"

epochs

Vector containing the epoch value of the sts/disProg object

Details

Using the Date class the reference values are formed as follows: Starting from t0 go i, i= 1,...,b years back in time. For each year, go w epochs back and include from here to w epochs after t0.

In case of weeks we always go back to the closest Monday of this date. In case of months we also go back in time to closest 1st of month.

Value

a vector of indices in epochs which match



surveillance documentation built on May 21, 2017, 1:35 a.m.
Search within the surveillance package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.