[R] tapply for matrices

Frank E Harrell Jr fharrell at virginia.edu
Thu Oct 10 20:31:58 CEST 2002

Does anyone have something like tapply that is extremely fast for matrices when there is a very large number of levels of the grouping variable?  
I'm referring to, for example, 

tapply(x, grouping.variable, function.operating.on.submatrix)

where x is a matrix and the submatrix is a subset of the rows of x.  The grouping variable's length equals the number of rows of x.
Frank E Harrell Jr              Prof. of Biostatistics & Statistics
Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine  http://hesweb1.med.virginia.edu/biostat
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list