I have a question that I'm not sure how to tackle. Suppose I have a time-series of length 12,000 and would like to know where in the time-series that a prescribed threshold value is exceeded, say, 10 times in a row. That is, for example, if the time series has y values that range from -1 to 1, and I want to determine when the value 0.5 is exceeded 10 times in a row...I'd like to not only know how many times this occurs, but where in the time-series it occurs (say for example by displaying the starting date in which this criteria is satisfied).

I know how to find the locations where the value exceeds a certain number, for example using data.frame, but I have no idea how to make the leap to what I want to do above...aside from combing through the data manually.