title: Sum values in a rolling/sliding window
body: <p>I have the following vector:</p>
  <pre><code>x = c(1, 2, 3, 10, 20, 30)
  </code></pre>
  <p>At each index, 3 consecutive elements are summed, resulting in the following vector:</p>
  <pre><code>c(6, 15, 33, 60)
  </code></pre>
  <p>Thus, first element is <code>1 + 2 + 3 = 6</code>, the second element is <code>2 + 3 + 10 = 15</code>, et.c</p>