Description Usage Arguments See Also Examples
Windowed / rolling operations on a vector, with a custom function fun
provided as input.
1 2 3 |
x |
A vector. |
k |
integer. Width of moving window; must be an integer between one and
|
fun |
character or function. The function to be applied on moving subvectors of
|
... |
Additional arguments to be passed to |
.idx |
integer. A vector of indices that can be precalculated with the function
|
n |
integer. Length of the input vector |
Functions roll_mean
and others in package RcppRoll for a more
efficient implementation of rollfun
to specific values of fun
.
Similarly, see functions rollmean
and others in package zoo and
functions runmean
and others in package caTools.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.