[R] Taking the sum of only some columns of a data frame
Bruce Ratner PhD
br at dmstat1.com
Fri Mar 31 18:20:13 CEST 2017
Hi R'ers:
Given a data.frame of five columns and ten rows.
I would like to take the sum of, say, the first and third columns only.
For the remaining columns, I do not want any calculations, thus rending their "values" on the "total" row blank. The sum/total row is to be combined to the original data.frame, yielding a data.frame with five columns and eleven rows.
Thanks, in advance.
Bruce
______________
Bruce Ratner PhD
The Significant Statistician™
[[alternative HTML version deleted]]
More information about the R-help
mailing list