I have a data frame with daily values. A sample of the data looks something like this:
data<-data.frame(day=c(1:20), score=c(8,15,8,20,40,1,6,42,81,18,55,35,37,85,66,12,32,42,22,64), value=c(1,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0))
The real data set comprises ~2000 rows.
I would like to be able to split the data frame into tibbles. Each tibble will consist of 10 rows. The first row of each tibble will be whenever value = 1.
Some rows will therefore be represented in more than one tibble.
Is it possible to do this using tidyverse packages?
Thanks in advance.