[R] find value between two other numbers?

fishkbob fishkbob at gmail.com
Fri Aug 13 01:10:48 CEST 2010


So basically I want to do this -

4 %in% 1:10
should return true

Would there be another way of doing this without having to do the 1:10 part?

I am using a very large data set and trying to do

459124 %in% 103000:983000

multiple times for many values, and it is taking quite a long time

Also, I would like to vary the x:y part, so I can't even make an object that
is c(x:y) and do a which(#=c(x:y)) because I would need to change x and y
each time.
-- 
View this message in context: http://r.789695.n4.nabble.com/find-value-between-two-other-numbers-tp2323513p2323513.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list