findintervals.RdFind indices i in vector xs such that either x=xs[i]
or such that xs[i]<x<xs[i+1] or xs[i]>x>xs[i+1].
findintervals(x, xs)Contrary to findInterval, the vector xs in
findintervals need not be sorted.
Vector of indices in 1..length(xs).
If none is found, returns integer(0).
If x is equal to the last element in xs, the index
length(xs) will also be returned.