I have a list of {0,1} values, say

y<-c(0,0,0,1,1,0,0,1,0,1,1,1,1)

I want to compute the first few zeros and the last few ones. So the output I
expect is 3 and 4 for this vector. Is there a fast way to match the numbers
easily?

	[[alternative HTML version deleted]]

