I have one dataframe:
Date area sales
1 201204 shanghai 23
2 201204 beijing 25
3 201204 beijing 16
4 201205 shanghai 55
5 201205 beijing 17
6 201205 shanghai 16
What I want to output is a table as follows:
Date shanghai beijing
201204 23 41
201205 71 17
How would I do this in R?
See Question&Answers more detail:os