title: How do I find the values greater than or equal to a and then find the minimum of these greatest values in R?
body: <pre><code>a &lt;- 0.6875
  estFj &lt;- c(-0.8231686, 0.1237904, 1.1967068, 1.3772572)
  
  #What I tried so far is: 
  
  for(i in estFj) {
    if (i &gt;= a) { 
      t = c(i)
    }
  }
  
  t
  </code></pre>
  <p>But it only gives the value of 1.3772572 whereas I need all the values of <code>estFj</code> greater than or equal to a and then find the minimum of these values that are greater than or equal to a!</p>
  <p>How do I fix this?</p>