Sum cells by group in data frame

396 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 answers

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