title: R Sum complete cases of two columns
body: <p>How can I sum the number of complete cases of two columns?</p>
  
  <p>With <code>c</code> equal to:</p>
  
  <pre><code>      a  b
  [1,] NA NA
  [2,]  1  1
  [3,]  1  1
  [4,] NA  1
  </code></pre>
  
  <p>Applying something like </p>
  
  <pre><code>rollapply(c, 2, function(x) sum(complete.cases(x)),fill=NA)
  </code></pre>
  
  <p>I'd like to get back a single number, <code>2</code> in this case. This will be for a large data set with many columns, so I'd like to use <code>rollapply</code> across the whole set instead of simply doing <code>sum(complete.cases(a,b))</code>.</p>
  
  <p>Am I over thinking it?</p>
  
  <p>Thanks!</p>