Description Usage Arguments Value
Even spacing of dates is required for many tests and assessments of
autocorrelation. This function checks for even spacing to within a specified
tolerance. If spacing is uneven, a histogram is immediately produced (if
hist=TRUE
), and a handling function is run (e.g., to produce an error
or warning, as specified by handler
).
1 2 | isTimestepRegular(dates, hist = TRUE, tol = .Machine$double.eps^0.5,
handler = stop)
|
dates |
A time series of dates in any format accepted by |
hist |
logical. If the time series is found to be irregular, should this function print a histogram of the observed time steps? |
tol |
time step tolerance, the accepatable amount of difference between time steps to still consider them regular. |
handler |
A function, e.g., |
TRUE if the time steps in dates
are identical to within the
tolerance set by tol, FALSE otherwise.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.