title: Special use of colSums(), na.rm = TRUE only if 1 or fewer are missing
body: <p>I need to sum some columns in a data.frame with a rule that says, a column is to be summed to <code>NA</code> if more than one observation is missing <code>NA</code> if only 1 or less missing it is to be summed regardless.</p>
  
  <p>Say I have some data like this,</p>
  
  <pre><code>dfn &lt;- data.frame(
  a  = c(3, 3, 0, 3),
  b  = c(1, NA, 0, NA),
  c  = c(0, 3, NA, 1))
  
  dfn
    a  b  c
  1 3  1  0
  2 3 NA  3
  3 0  0 NA
  4 3 NA  1
  </code></pre>
  
  <p>and I apply my rule, and sum the columns with less then 2 missing <code>NA</code>. So I get something like this.</p>
  
  <pre><code>  a  b  c
  1 3  1  0
  2 3 NA  3
  3 0  0 NA
  4 3 NA  1
  5 9 NA  4
  </code></pre>
  
  <p>I've played around with <code>colSums(dfn, na.rm = FALSE)</code> and <code>colSums(dfn, na.rm = TRUE)</code>. In my real data there is more then three columns and also more then 4 rows. I imagine I can count the missing some way and use that as a rule?</p>