Description Usage Arguments Details Value Examples
This function returns a basic exponential moving average (EMA) of the given vector.
1 |
vec |
A numeric vector. |
n |
An integer: moving window size, with 1 as default |
smFac |
A number: smoothing factor, with default 2/(n+1), see details below. |
This function makes fairly efficient the computation of EMA, which dubbed as basic exponential smoothing, the same section of https://en.wikipedia.org/wiki/Exponential_smoothing. It provides an access to define smFac yourself, i.e the smoothing factor, whose default is 2/(n+1).
This function returns a vector whose length is the same as that of vec.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.