[R] SUM,COUNT,AVG

Christian ozric at web.de
Mon Apr 6 17:30:34 CEST 2009


A good package for this sort of questions is doBy, too.

library(doBy)
summaryBy( tpdv + UM + qta ~ Materiale ,data=data,FUN=c(sum,length,mean))

regards, Christian

> Hi,
> I ve been searching a lot in internet..but I can t find a solution
> Attached, you find a file.
> I need for each (Materiale, tpdv, UM) to find sum,avg and count
> My idea was to aggregate for the 3 parameters ..but I don t know how to get
> the numeric value (SUM,COUNT,AVG) I need.
> Can you help me?
> thank you
>
> http://www.nabble.com/file/p22905322/ordini2008_ex.txt ordini2008_ex.txt 
>




More information about the R-help mailing list