[R] Fastest way to repeatedly subset a data frame?

hadley wickham h.wickham at gmail.com
Fri Apr 20 21:37:18 CEST 2007


> But... it's not any faster, which is worrisome to me because it seems
> like your code uses rownames and would take advantage of the hashing
> potential of named items.

I'm pretty sure it will use a hash to access the specified rows.
Before you pursue an environment based solution, you might want to
profile the code to check that the hashing is actually the slowest
part - I suspect creating all new data.frames is taking the most time.

Hadley



More information about the R-help mailing list