How do I sum across certain columns? : <p>I have a data frame called <code>df</code> that looks like this:</p>

<pre><code>name score1 score2 score3
Joe     1      NA    3
Jane    NA     2     3
</code></pre>

<p>How do I make a column named <code>sum</code> that sums non-empty cells in <code>score1</code>, <code>score2</code> and <code>score3</code>?</p>
