Hello,

I have 2 variable: one is an "id" sequence from 1:1000 and the other is
variable with real values "VI" from -15.0 to 20.0 and I want to detect id
values that have indicator values less than a certain threshold, for
example (x=1) BUT that are in sequence equal or longer than 5.

For instance, in the following column I want to recognize the sequence from
"id" 4 to 8 that are values with a "VI" values lower than 1 in a sequence
of 5, and not the id values 1 and 2 which are values with VI lower than my
threshold but the sequence is lower than 5.

id VI

1 -10
2  -4
3  5
4 -2
5 -5
6 -3
7 -2
8 -1
9  4
10 8

 Any help would be appreciated!

Inti

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to