When ! is.null(dim(x))
foldrange(x, window, fn, acc=0)
Details
This function is the fold counterpart of maprange. It's primarily
here for completeness purposes, as the utility of this function
is still to be determined.
Author(s)
Brian Lee Yung Rowe
See Also
mapfoldfoldblock
Examples
## Not run:
# Mean of rolling means
z <- sapply(1:500,
function(x) foldrange(rnorm(50), 10, function(a,b) mean(a) + b) / 41)
## End(Not run)