so I have a CSV file that I imported into R studio. I ran my analysis and then was informed that there was a mistake with the data collection. Every 4 rows actually represents 1 month and I need to combine every 4 rows into 1 for each of 6 variables. The data looks like this:
X2 X3 X4 X5 X6 X7
1 3830 0 0 1184 0 5765
2 0 0 153 0 153 153
3 0 0 0 73 73 0
4 0 0 153 0 153 0
5 3815 0 3354 651 903 5174
6 0 0 138 101 273 558
7 0 0 322 0 272 322
8 0 0 0 101 273 420
9 0 0 3682 3302 83 6485
10 165 0 63 0 293 165
11 0 0 98 98 0 0
12 0 0 0 0 230 0
So basically I want rows 1,2,3,4 combined into one new row. 5,6,7,8 into another etc. What is the easiest way to go about doing this in R???