Hi all,

I have a nx1 logical array of zeros and ones and I want to calculate the individual lengths of all 1-consecutive sequences contained in it. Is there an easy quick way to do this in R? So, if I have a vector such as

111001101000011111110

I would like to get (1) 3, (2) 2, (3) 1, (4) 7

Any help would be appreciated! thanks!

Jorge

	[[alternative HTML version deleted]]

