I have a data set consisting of 0s and 1s in a column. I figured out the row index where the toggling happens and now I want to sample out data from these by setting these particular row IDS. 
Here's my data frame:
row id   mode 
1          0
2          0
3          1
4          1
5          0
6          0
7          0
8          1
9          1
10         1
Once I split the data frame, I should get 4 other data frames like so:
y[1] : 
row id   mode 
1           0
2           0
y[2]
row id     mode 
3            1 
4            1
y[3]
row id      mode 
5            0
6            0
7            0