Sum cells by group in data frame

414 Views Asked by At

I have a huge data frame that looks like this:

dados

and I want to sum the cells in column V9 according to V3; for example, I want to sum every V9 cell when V3=="Acrelândia".

1

There are 1 best solutions below

0
On
aggregate(V9~V3,df,sum);​​​​​​