title: set a threshold for complete cases to remove NA from multiple columns in R
body: <p>There might be an easy answer to this, but I am not able to make it work. I have a data table that looks like this:</p>
  
  <pre><code>df &lt;- data.table(t = c(1, 2, 3), a = c(NA, NA, 4), b = c(NA, 4, NA), c = c(NA, 4, NA))
  </code></pre>
  
  <p>How can I remove only the rows where all columns but "t" have NA's. It should be fast because of my big data files, so I would like to do it especially with complete.cases. I couldn't find a solution to this problem yet.</p>
  
  <p>The result should look like this</p>
  
  <pre><code>dfRes &lt;- data.table(t = c(2, 3), a = c(NA, 4), b = c(4, NA), c = c(4, NA))
  </code></pre>