[R] Data Frame Search Slow

TimothyDalbey tmdalbey at gmail.com
Tue Nov 22 21:45:10 CET 2011

Update from email outside of this thread:

Justin Haynes writes:

> matrices will help, but two quick solutions:
> if you are looking for single items to go in the some_value space, use ==
> instead of %in% and you'll notice speedups.  The second more involved
> option is to take a look at the package data.table.
> it provides a wrapper for data.frame that has some impressive
> optimizations as well as allowing for SQL like indexing and syntax.
> hope that helps!

Justin, thanks.  Here's the before and after clock:


user  system elapsed 
  0.976   0.164   2.607 


user  system elapsed 
  0.624   0.156   1.810 

You are correct.  I still need to get that elapsed down even more. 
Data.table sounds like a good option.  I'll look into it more.  Thank you.

View this message in context: http://r.789695.n4.nabble.com/Data-Frame-Search-Slow-tp4096906p4097261.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list