Try this: aggregate(iris[,1:4], list(Species = iris[,5]), mean)
On Thu, Aug 7, 2008 at 8:01 AM, glaporta <[EMAIL PROTECTED]> wrote: > > Hi folk, > I tried this and it works just perfectly > tapply(iris[,1],iris[5],mean) > but, how to obtain a single table from multiple variables? > In tapply x is an atomic object so this code doesn't work > tapply(iris[,1:4],iris[5],mean) > > Thanx and great summer holidays > Gianandrea > -- > View this message in context: > http://www.nabble.com/multiple-tapply-tp18868063p18868063.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org 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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O ______________________________________________ R-help@r-project.org 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.