Skip to content

aggregate slow with many rows - alternative?

3 messages · TEMPL Matthias, jim holtman, Hans-Peter

#
Hi,

Yesterday, I have analysed data with 160000 rows and 10 columns. 
Aggregation would be impossible with a data frame format, but when converting it to a matrix with *numeric* entries (check, if the variables are of class numeric!) the computation needs only 7 seconds on a Pentium III. I??m sadly to say, that this is also slow in comparsion with the proc summary in SAS (less than one second), but the code is much more elegant in R!

Best,
Matthias
#
Many thanks for all your answers. Converting to a matrix didn't help,
I tried with Hmisc but didn't get anywhere (different summary
functions, multiple levels).

2005/10/14, jim holtman <jholtman at gmail.com>:
[snip]

Wow! That's a wonderful suggestion, Your code works just fine with my
data (takes 11 seconds). Thanks a lot, I couldn't have written such
code (reading some help entries now...).

Hans-Peter