Skip to content
Back to formatted view

Raw Message

Message-ID: <971536df0901160409t4365da5cnbe4c904fbbb1f766@mail.gmail.com>
Date: 2009-01-16T12:09:49Z
From: Gabor Grothendieck
Subject: Value Lookup from File without Slurping
In-Reply-To: <497066FF.3030100@quantide.com>

On Fri, Jan 16, 2009 at 5:52 AM, r at quantide.com <r at quantide.com> wrote:
> I agree on the database solution.
> Database are the rigth tool to solve this kind of problem.
> Only consider the start up cost of setting up the database. This could be a
> very time consuming task if someone is not familiar with database
> technology.

Using sqldf as mentioned previously on this thread allows one to use
the SQLite database with no setup at all.  sqldf automatically creates
the database, generates the record layout, loads the file (not going through
R but outside of R so R does not slow it down) and extracts the
portion you want into R issuing the appropriate calls to RSQLite/DBI and
destroying the database afterwards all automatically.  When you
install sqldf it automatically installs RSQLite and the SQLite database
itself so the entire installation is just one line: install.packages("sqldf")