title: Remove rows from a data frame where a cell is smaller or greater than values in R
body: <p>I would like to remove all lines from a data frame (df) where the value in column 1 is smaller or greater than xi and xf. I have the following error message. How to solve it ?</p>
  <pre><code>&gt; df
          m.cx      m.cy s.radius.min s.radius.max
  1   65.73316  25.69588    11.095535    40.696981
  2  156.24181 129.77241    19.377341    33.834851
  3  483.60853 155.23006     9.419478    16.288080
  4  168.21591 312.73864     1.293626    10.224021
  5  510.80412 354.77320     2.869728     7.532286
  6  277.21467 409.62152    20.411710    28.775076
  7   92.51111 495.51111     1.416217     5.048161
  8  397.36817 607.47749     8.424518    18.536168
  9  224.93790 623.28266     8.530353    15.266782
  10 239.04444 720.13333     2.757263     4.266439
  11 491.84127 758.23810     1.717259     6.194962
  
  xi &lt;- 100
  xf &lt;- 200
  
  i &lt;- 0
  for(i in seq_len(ncol(df))){
    if(df[i,1] &lt;= xi || df[i,1] &gt;= xf){
      df &lt;- df[-i,]
    }
  }
  Error in if (df[i, 1] &lt;= xi || df[i, 1] &gt;= xf) { : 
    missing value where TRUE/FALSE needed
  df
  &gt; df
         m.cx     m.cy s.radius.min s.radius.max
  2  156.2418 129.7724    19.377341    33.834851
  4  168.2159 312.7386     1.293626    10.224021
  6  277.2147 409.6215    20.411710    28.775076
  8  397.3682 607.4775     8.424518    18.536168
  10 239.0444 720.1333     2.757263     4.266439
  </code></pre>