Re: [R] finding numbers in a range

2011-06-01 Thread David Winsemius
On Jun 1, 2011, at 5:07 PM, Salih Tuna wrote: Hi, Is there a quick way of finding if numbers in a vector falls in between a range defined in another matrix. As an example let x y 0 1 3 2 6 9 2515 18 I want to check one by one whether 0,2 and 25 falls in any of the ran

[R] finding numbers in a range

2011-06-01 Thread Salih Tuna
Hi, Is there a quick way of finding if numbers in a vector falls in between a range defined in another matrix. As an example let x y 0 1 3 2 6 9 2515 18 I want to check one by one whether 0,2 and 25 falls in any of the ranges in y. I am using 2 for loops but it is taking a hug