I have a data frame with these variables:
Datum value morph sex product
2016-04-05 5 Winter M ACV
2016-04-05 1 Summer M ACV
2016-04-05 18 Winter F ACV
2016-04-05 3 Summer F ACV
2016-04-05 0 Winter M FRA
2016-04-05 0 Summer M FRA
2016-04-05 0 Winter F FRA
2016-04-05 0 Summer F FRA
2016-04-08 0 Winter M ACV
2016-04-08 0 Summer M ACV
I want to sum the values of F and M, but keep seperate values for morph and product. Now I have 8 values per date and I should go to 4. How do I do this?
I read about tapply, ddplyr and aggregate, but I either don't understand them well or they're not the solution to my problem...
Summing things I know how to do, but not while keeping the other columns.