title: Moving sum of a certain window in R
body: <p>I want to calculate a running sum of the next 5 rows. In this case, on row 1 it will show the sum of numbers from row 2 to row 6. The last 5 rows of the data frame can be filled with NA.</p>
  
  <p>The data looks like this</p>
  
  <p><a href="https://i.stack.imgur.com/nMC5L.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>And the ideal result would look like</p>
  
  <p><a href="https://i.stack.imgur.com/BhW0K.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>Thank you!</p>