title: An anomaly in findInterval function
body: <p>I want to use <code>findInterval</code> function but it acts odd for numbers on the border. Here is the anomaly I observed.</p>
  
  <pre><code>bins &lt;- seq(from = -4.4, to = 1.2, by = .8); bins
  [1] -4.4 -3.6 -2.8 -2.0 -1.2 -0.4  0.4  1.2
  findInterval(x = -.4, vec = bins)
  [1] 6
  findInterval(x = .4, vec = bins)
  [1] 6
  
  bins &lt;- seq(from = -3.6, to = 1.2, by = .8); bins
  [1] -3.6 -2.8 -2.0 -1.2 -0.4  0.4  1.2
  findInterval(x = -.4, vec = bins)
  [1] 4
  findInterval(x = .4, vec = bins)
  [1] 6
  
  bins &lt;- seq(from = -2.8, to = 1.2, by = .8); bins
  [1] -2.8 -2.0 -1.2 -0.4  0.4  1.2
  findInterval(x = -.4, vec = bins)
  [1] 3
  findInterval(x = .4, vec = bins)
  [1] 4
  </code></pre>
  
  <p>I expected an output like the last one. 
  Am I missing something here? Why this function puts consecutive numbers in such a random manner?</p>