rowSums() is a built-in R function that adds numeric variables across each row. It is useful when one row represents an NBA team and columns hold season-by-season salaries or wins. section 11.4.1
Summing salaries and wins
After selecting Charlotte’s salary and win columns, calculate several team-level measures with mutate(): rowSums(.[2:17]) gives total salaries, rowSums(.[18:33]) gives total wins, and dividing those results gives salary efficiency. Dividing total wins by 16 and rounding gives mean wins. section 11.4.1
