[R] aggregate slow with many rows - alternative?

Frank E Harrell Jr f.harrell at vanderbilt.edu
Fri Oct 14 04:59:52 CEST 2005


Gabor Grothendieck wrote:
> Convert dat to a matrix and see if working with the
> matrix instead of a data frame speeds things up
> enough.

In the Hmisc package the asNumericMatrix and matrix2dataFrame functions 
facilite this.

Also look at the summarize and mApply functions in Hmisc, which can be 
quite fast.

Frank Harrell




More information about the R-help mailing list