Hi, I'm trying to collapse a data frame that I have with R, the idea is that I have 3 variables: site, species, biomass. For each site I have a list of species where the same species are repeated several times in the sites with biomasses, and I want to leave for each site only once each species, with the sum of the abundances if it has left more than once in that site. I was using the dplyr package, and trying to do it with summarize (group_by), but I only get the list of all the species that come out in total in all the sites together and their total biomass of all the sites together, not separated by each site observed. But it would be good to do it in any way in R. Thank you very much for your time.