How about this: ddply(test.set, .(site), colwise(max)) On Wednesday, May 11, 2011 at 11:46 AM, Justin wrote: > test.set<-data.frame(site=1:10,x=.Random.seed[1:100],y=rnorm(100)) > means<-ddply(test.set,.(site),mean) > means
[[alternative HTML version deleted]] ______________________________________________ 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.