I want to sum the numbers of first 3 rows, then sum the number of second 3 rows, and so on. Basically, sum every 3 rows.
Below is a reproducible code:
id <- 1:15
numbers <- 6:20
df <- data.frame(id, numbers)
Please help, thanks! In my real data, I need to sum every 550 rows.