I’ve tried to do a merge() in R between two data.frames but am running out of RAM, so I’d like to export the data.frame to an SQLite database (using the RSQLite library).
Writing the data.frame to the database is simple enough with dbWriteTable(). But, I don’t think that I can perform the ‘JOIN’ operation in SQLite3 without a primary key…
My question is: Is there a way to set/create a primary key for a data.frame when I create an SQLite table in R? If I can’t do this, does anyone have a clever work-around they’ve been using?
I realize that this is an R question, and not so much a stats question…
This type of question is discussed on R-sig-DB. In particular, see:
https://stat.ethz.ch/pipermail/r-sig-db/2010q1/000813.html