Want to make 'moving' sum of a column in a data frame with group of records and number of records per set. - General - RStudio Community
![Calculate row sums conditional on column with 1 and 0's in a data frame in R , want the sum between consecutive 1's between 0's - Stack Overflow Calculate row sums conditional on column with 1 and 0's in a data frame in R , want the sum between consecutive 1's between 0's - Stack Overflow](https://i.stack.imgur.com/yNDLn.png)
Calculate row sums conditional on column with 1 and 0's in a data frame in R , want the sum between consecutive 1's between 0's - Stack Overflow
![r - How to calculate cumulative sum for the interval defined by a different column? - Stack Overflow r - How to calculate cumulative sum for the interval defined by a different column? - Stack Overflow](https://i.stack.imgur.com/2Fwa2.jpg)