I have data which consists of one column of 0s and 1s (Value column, below). I would like to uniquely identify each continuous "set" of 1s, with a consecutively numbered value (like the example "ID" column below).
Any suggestions on how I might accomplish this?
Value ID
0 0
1 1
1 1
0 0
1 2
1 2
0 0
0 0
1 3
1 3
1 3
0 0
1 4
1 4
Bookmarks