title: r - Sum multiple columns separately for each variable
body: <p>I have a data frame with 52 columns and approximately 850,000 rows.  The first 50 columns are all coded Yes/No.  The last 2 columns are numeric.  My goal is to sum columns 51 and 52 for each of the 50 variables.  In other words, group by column 1 and sum columns 51 and 52, group by column 2 and sum columns 51 and 52, etc.  Just wondering the best way to go about this.</p>