powered by
Sum all columns but one (pset) of a data frame
col.sum(d, skip = c())
The data frame
The columns which should not be included in the sum
The original data frame with a new column (sum) holding the sum