2
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 what are the values of my vector x, which has test$values=="TRUE". I mean, I want to know the values and not the position they are in.
NOTE: I want to do this using the rle function.
That’s more or less what I wanted to know! But I was able to do what I wanted to do. Still, thank you so much for your help.
– user20273