## What’s the best way to group by two variables in R? [duplicate]

In the following DF, called "contribs," is there a way to quickly calculate the sums in the amount column based on state? In other words, the sum of the amount from all rows that have CA in the state column, and then all rows tha…