rollMinMax | R Documentation |
This implementation is minimal without error checking, or NA handling. It is taken from the ichimoku package which had several more complicated variants, and is reused here with just tidyCpp.
rollMinMax(x, window, min = TRUE)
x |
A numeric vector. |
window |
An interger with the size of the rolling window. |
min |
A logical which, if true, selects minimum, else maximum |
The ichimoku variant is by Charlie Gao and credits Andrew Uhl for the initial implementation.
A vector of the same length as 'x' with elements 1 to (length(window) - 1) containing NAs.
Dirk Eddelbuettel for this version, R Core for the underlying code
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.