I have time series data:
mytime <- seq.Date(as.Date("2015-01-01"), as.Date("2022-01-01"), "day")
value <- rnorm(n = length(mytime))
df <- cbind.data.frame(mytime, value)
I want to create a new column which starts with 1 and increases by 1 for every fixed number of rows. For example, the first 100 rows get a value of 1, the next 100 rows get a value of 2, and so on.