title: Conditionally remove rows from a data frame but keep missing values (NA)
body: <p>I have a data frame like this:  </p>
  
  <pre><code>df &lt;- data.frame(ID = c(1,2,3,4,5),TEST=c(TRUE,FALSE,FALSE,NA,TRUE))
  df
  
     ID  TEST
  1  1  TRUE
  2  2 FALSE
  3  3 FALSE
  4  4    NA
  5  5  TRUE  
  </code></pre>
  
  <p>I want to remove the rows where TEST=TRUE and keep the rows where TEST=FALSE and TEST=NA to get:  </p>
  
  <pre><code>&gt; df
  
    ID  TEST
  1  2 FALSE
  2  3 FALSE
  3  4    NA
  </code></pre>
  
  <p>However, when I use <code>subset(df, df$TEST!=TRUE)</code>, R gets rid of the rows where TEST=TRUE and where TEST=NA. How do I keep the row(s) where TEST=NA?</p>