Re: [R] translating SQL statements into data.table operations

2010-03-25 Thread Matthew Dowle
Nick, Good question, but just sent to the wrong place. The posting guide asks you to contact the package maintainer first before posting to r-help only if you don't hear back. I guess one reason for that is that if questions about all 2000+ packages were sent to r-help, then r-help's traffic

[R] translating SQL statements into data.table operations

2010-03-24 Thread Nick Switanek
I've recently stumbled across data.table, Matthew Dowle's package. I'm impressed by the speed of the package in handling operations with large data.frames, but am a bit overwhelmed with the syntax. I'd like to express the SQL statement below using data.table operations rather than sqldf (which was

Re: [R] translating SQL statements into data.table operations

2010-03-24 Thread Gabor Grothendieck
Note that, in general, you can speed up joins, even within sqldf, by adding indexes to your tables and ensuring that your select statement is written in such a way that the indexes are used. See example 4i on the sqldf home page. On Wed, Mar 24, 2010 at 4:51 PM, Nick Switanek nswita...@gmail.com