movav | R Documentation |
Compute the moving average of a vector.
movav(x, pkg = "native", mode = "centered", n = 5, na.rm = TRUE)
x |
a numeric vector. |
pkg |
string: "native" (default) or the name of a package with
a function that computes moving averages. Besides "native", only
"zoo" is allowed ( |
mode |
String: "centered" (default) indicates that the moving average should be centered. |
The resulting moving average will be of order three.
A vector with the moving average of the input.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.