SyntaxFix
Write A Post
Hire A Developer
Questions
If x is a dataframe with your data, then the following will do what you want:
x
require(reshape) recast(x, Category ~ ., fun.aggregate=sum)