Re: [R] Tabulation of aggregated data.frame

2008-05-09 Thread Henrique Dallazuanna
Try: xtabs(x ~ Group.2 + Group.1, data=x) On Fri, May 9, 2008 at 1:25 PM, Oh Dong-hyun <[EMAIL PROTECTED]> wrote: > Hi useRs! > > I would like to know how to make aggregated data.frame with aggregate() > tabulated. > > For example, I run the following command to aggregate re with respect to > gr

Re: [R] Tabulation of aggregated data.frame

2008-05-09 Thread Jorge Ivan Velez
Hi there, Try this: R> tapply(aggr$x,aggr[,c(2,1)],function(x) x) Group.1 Group.219921993199419951996199719981999 2000 15 0.16392 0.15467 0.15456 0.15391 0.16511 0.17368 0.17955 0.19805 0.20546 16 0.16237 0.18359 0.13811 0.13988