[R] ddply with mean and max...

Justin jtor14 at gmail.com
Wed May 11 19:31:53 CEST 2011


Scott Chamberlain <scttchamberlain4 <at> gmail.com> writes:

> 
> 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]]
> 
> 

Thats the ticket!  So mean is already set up to operate on columns but max and
min are not?  I guess its not too important now I know ... but whats going on in
the background that makes that happen?



More information about the R-help mailing list