powered by
MovingSum(x, n = 2)
filter
MovingSum(1:5) # the results: 3 5 7 9
Run the code above in your browser using DataLab