Skip to content
Prev 78920 / 398502 Next

functions available for use with aggregate?

1.  There is also "aggregate.zoo" in the "zoo" package.

	  2.  If your question is which functions can be used for the "FUN" 
argument, you can write your own.  For example:

 > set.seed(1)
 > tstDF <- data.frame(x=rep(1:4, e=2),
+                     y=rnorm(8))
 > aggregate(tstDF[2], tstDF[1],
+           function(z)max(z)/min(z))
   x          y
1 1 -0.2931474
2 2 -1.9090787
3 3 -0.4016093
4 4  1.5147327
 >
	  spencer graves
Sundar Dorai-Raj wrote: