I have the following dataframe (df1):
ID someText PSM OtherValues ABC c 2 qwe CCC v 3 wer DDD b 56 ert EEE m 78 yu FFF
In base:
aggregate(PSM ~ ID, data=x, FUN=sum) ## ID PSM ## 1 ABC 2 ## 2 CCC 58 ## 3 DDD 56 ## 4 EEE 80 ## 5 FFF 1 ## 6 GGG 90 ## 7 KOO 45 ## 8 LLL 4 ## 9 ZZZ 8