I would like to summarise this data set by grouping 1st by period, and 2nd by Payer id so that results are shown as subtotal for any given user by month as follows:
data.frame:
Payer Period
1 10 1-1015
2 15 2-1015
3 14 3-1015
1 1 1-1015
3 5 1-1015
1 7 4-1015
3 8 4-1015
1 4 5-1015
And results should look like this:
Payer Period
1 11 1-1015
3 5 1-1015
2 15 2-1015
3 14 3-1015
1 7 4-1015
3 8 4-1015
1 4 5-1015
Which is the best way to do this? Thanks!