mav: Moving average over a continuous variable

Description Usage Arguments Value Source

Description

Apply a moving average over a variable defaulting to a window of 5

Usage

1
mav(x, n = 5)

Arguments

x

Continuous variable over which to apply the moving average

n

number of observation over which to take the moving average

Value

The moving (or rolling) average of x over the n window

Source

http://druedin.com/2012/08/11/moving-averages-in-r/


boshek/samfunr documentation built on May 13, 2019, 12:37 a.m.