Description Usage Arguments Value Author(s) Examples
Helper function to compute 'moving' functions, such as the 'moving average'
1 |
x |
A vector of numbers |
n |
Size of the 'window', i.e. the number of sequential elements to use in the function |
fun |
A function like mean, min, max, sum |
type |
Character. One of 'around', 'to', or 'from'. The choice indicates which values should be used in the computation. The focal element is always used. If |
circular |
Logical. If |
na.rm |
Logical. If |
Numeric
Robert J. Hijmans, inspired by Diethelm Wuertz' rollFun function in the fTrading package
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.