roll | R Documentation |
Applies function fun
within a rolling (moving) window
of size w
to vector numeric vector x
.
roll(x, w = 3, fun = mean)
x |
numeric vector (time-series) |
w |
width of moving window |
fun |
function to be applied |
vector of length length(x)-w
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.