Skip to content
Prev 274304 / 398506 Next

Create order of numbers based on a given vector

try this:

vec <- c(FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE)

cumsum(!vec)


I hope it helps.

Best,
Dimitris
On 10/13/2011 1:15 PM, syrvn wrote: