title: which.max() does not return NA
body: <p>I have a bunch of ordered vectors containing numbers between 0 and 1. I need to find the index of the first element over a certain value r:</p>
  
  <pre><code>x &lt;- c(0.1, 0.3, 0.4, 0.8)
  which.max(x &gt;= 0.4)
  [1] 3  # This is exactly what I need
  </code></pre>
  
  <p>Now if my target value is over the maximum value in the vector, which.max() returns 1, which 
  can be confused with the "real" first value: </p>
  
  <pre><code>which.max(x &gt;= 0)
  [1] 1
  which.max(x &gt;= 0.9) # Why?
  [1] 1
  </code></pre>
  
  <p>How could I modify this expression to get an NA as a result?</p>