Simple moving averages with formula : <p>I have to calculate Simple Moving Averages on some data with this formula in R:</p>

<p><a href="https://i.stack.imgur.com/dHXCT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dHXCT.png" alt="formula"></a></p>

<p>Does anybody know how to do that?</p>
