So i have this Dataframe that have different variables of interest separated by hour. I want to aggregate those variables with the sum (Amount) by day by variable (Type), but im new at R and im having a hard time to do it. It looks like this:
Date Hour Type ID Amount Remaining Price 1 Price 2 Sell
01/01/2019 12:03:50 Devolution D 6 - 2,8 2,8 3,19
01/01/2019 12:03:50 Devolution D 10 - 2,8 2,8 3,19
01/01/2019 13:00:01 Correction D 354 0 2,8 2,8 3,19
01/01/2019 18:30:20 Client L 1 - 2,8 2,8 3,19
02/01/2019 02:00:30 Enter D 36 - 2,2 - 4,29
02/01/2019 08:38:18 Enter D 10 - 2,2 - 4,29
02/01/2019 19:00:20 Selling L 1 -99 2,0 2,5 3,59
02/01/2019 22:12:00 Selling L 3 - 2,0 2,5 3,59
02/01/2019 23:47:52 Selling L 1 - 2,0 2,5 3,59
I want to transform it to be like this:
Date Type ID Amount Remaining Price 1 Price 2 Sell
01/01/2019 Devolution D 16 - 2,8 2,8 3,19
01/01/2019 Correction D 354 0 2,8 2,8 3,19
01/01/2019 Client L 1 - 2,8 2,8 3,19
02/01/2019 Enter D 46 - 2,2 - 4,29
02/01/2019 Selling L 4 -99 2,0 2,5 3,59