Hi [email protected] napsal dne 26.02.2010 10:32:34:
> > Hi, > > When I run the Aggregate function in repeat loop, I got the following error: Why and how exactly you use aggregate in loop? > > Error in sort.list(unique.default(x), na.last = TRUE) : > 'x' must be atomic for 'sort.list' > Have you called 'sort' on a list? > > How to solve this error. Anyone can help me. Urgent. Using this weird construction on my data I do not get any error. for (i in 2:5) print(aggregate(zeta[,i], list(zeta[,"dus"]), mean)) Group.1 x 1 ano 6.865000 2 ne 6.592727 Group.1 x 1 ano 6.785000 2 ne 6.635455 Group.1 x 1 ano 0.9426667 2 ne 0.5016364 Group.1 x 1 ano 1.345167 2 ne 1.183727 Please provide at least a code, better with some simple fake data. Regards Petr > > Thanks. > Meenakshi. > -- > View this message in context: http://n4.nabble.com/Error-in-Aggregate- > function-tp1570370p1570370.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

