powered by
filter
ma(x, n, sides = 1)
ma(1:10, n = 3, sides = 2) # centered around lag 0 ma(1:10, n = 3) # past values
Run the code above in your browser using DataLab