[R] Dplyr question
Nico Gutierrez
n|co@gut|errezo @end|ng |rom gm@||@com
Thu Oct 15 12:39:37 CEST 2020
Hi All,
Trying to get familiar with dplyr so I have a basic question:
How to summarise sum(Values) per species, maintaining Code column (each species has a Code):
Species Values Code
1 Acanthocybium solandri 33 LC
2 Makaira nigricans 20 VU
3 Makaira nigricans 20 VU
4. Makaira nigricans 20 VU
5 Sarda sarda 2 LC
4 Lethrinus lentjan 12 LC
5 Raja pita 8 DD
6 Raja pita 2 DD
I need:
Species Values Code
1 Acanthocybium solandri 33 LC
2 Makaira nigricans 60 VU
3 Sarda sarda 2 LC
4 Lethrinus lentjan 12 LC
5 Raja pita 10 DD
Thanks :)
More information about the R-help
mailing list