[R] Odp: Aggregate Function

2009-04-23 Thread Petr PIKAL
Try to set scipen in options. ?options e.g. options(scipen=12) Regards Petr r-help-boun...@r-project.org napsal dne 23.04.2009 12:30:11: > Hi all, > > I am currently carrying out the following aggregate function: > > D2 <- with(D1,aggregate(COST, list(FRUIT, VEG),FUN="sum")) > > The function

Re: [R] Odp: aggregate function oddity

2007-09-18 Thread Gustaf Rydevik
On 9/18/07, Mihalicza Péter <[EMAIL PROTECTED]> wrote: > Sorry for the confusion, I was not clear enough, so I made a small > example to illustrate: > > >m=data.frame(fac1=rep(c(1,2),3), fac2=c("a","b","b","b","a","b"), > num1=1:6, num2=7:12) > > m$fac1=as.factor(m$fac1) > > m > fac1 fac2 num1

Re: [R] Odp: aggregate function oddity

2007-09-18 Thread Mihalicza Péter
Sorry for the confusion, I was not clear enough, so I made a small example to illustrate: >m=data.frame(fac1=rep(c(1,2),3), fac2=c("a","b","b","b","a","b"), num1=1:6, num2=7:12) > m$fac1=as.factor(m$fac1) > m fac1 fac2 num1 num2 11a17 22b28 31b3

[R] Odp: aggregate function oddity

2007-09-18 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 17.09.2007 14:29:17: > Dear All, > > I tried to aggregate the rows according to some factors in a data frame. > I got the > "Error in Summary.factor(..., na.rm = na.rm) : > sum not meaningful for factors" > message. This problem was once already discusse