I have the following datafile were B are participants (participant n.2 and participant n.4) and F is the number of behaviours. From this datafile I need to derive another datafile where each row is one participant (so in this case I would have a row for n.2 and a row for .4 and F would be the sum of the behaviours (so in this case it would be 0 and 7) OF EACH PARTICIPANT

FROM THIS -->

B F

2 0
2 0
4 5
4 1
4 1

-->TO THIS

2 0
4 7

How do I do this in the most economic way possible (I have hundreds of rows and 80 participants and I don't want to do the sum for each participant separately...)?

--> How do I sum the numbers in column F "in groups" according to the number on column B (if it is the same, then sum it, if not then create another row and another sum)??


Your help would be greatly appreciated!!!
Thank you