Skip to content
Prev 131013 / 398502 Next

Need help on changing a table

That's no table that's a data.frame :). 

For what you want probably the easiest way is 
aggregate.  Type ?aggregate for the help information

Based on your example and assuming the data is called
"mydata" this shold do what you want.


aggregate(mydata[,2:3], by=list(item=mydata$Item),
sum)
--- gsmkb86 <gsmkb_86 at hotmail.com> wrote: