I'm using the rle function.
x = rnorm(10,0,1)
l = 1
teste = rle(x > l)
evento = teste$lengths[teste$values=="TRUE"]
I'm having trouble extracting the values from my x vector, which has test $ values == "TRUE". That is, I want to know the values and not the positions they meet.
NOTE: I want to do this by using the rle function.