title: How to perform sequential mathematical operations with R
body: <p>I have a numeric vector in R containing a large set of value (ex. 0.05, 0.06, 0.09 etc.). I would like to perform a mathematical operation by sequential +1 moving alongside the vector. For example, I want a mean of 5 points (from 1-5), then move one position and get the mean (positions 2-6) and repeat (positions 3-7, 4-8 and so on). Store the values in a vector and eventually plot.</p>