ps_sma | R Documentation |
Returns the simple moving average with a window of 2 * n
.
ps_sma(x, n = 1L, na.rm = FALSE)
x |
An integer or double vector. |
n |
A positive integer of the window before and after each value. |
na.rm |
A flag indicating whether to ignore missing values when calculating the mean. |
A double vector.
ps_sma(1:4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.