Skip to content
Prev 263906 / 398502 Next

Fastest way of finding if any members of vector x fall in the range of the rows of matrix y

try sqldf:
x
1 1
2 2
3 6
4 5
s  e
1 1  4
2 3  5
3 8 10
+     select x.x
+         from x, y
+         where x.x between y.s and y.e
+ ")
  x
1 1
2 2
3 5

        
On Mon, Jun 27, 2011 at 5:33 AM, Salih Tuna <salihtuna at gmail.com> wrote: