Skip to content
Prev 263 / 1559 Next

SQLite: When reading a table, a "\r" is padded onto the last column. Why?

"David James" <daj025 at gmail.com> writes:
I wonder if things have changed at all in that regard.  I would expect
read.table to be slower, but, if called carefully, not _extremely_
slower.  We should do some timings...

My concern with the .import-like code is on the maintenance
side and in terms of providing all of the same features as read.table
(at which point, perhaps the performance gain will diminish).
The prepared statement/binding approach is also the thing to do when
you have a large text file that you want to import, but you need to do
some massaging along the way (perhaps you only want parts of it,
perhaps you want to load into two or more tables, etc).
I can see the use-case, but have some reservations.  Without the
functionality we have now you could:

  a. use SQLite directly and skip R.
  b. use R and make a system call to the sqlite command line.

The dbWriteTable functionality is more elegant than (a) or (b), and
perhaps I would have fewer reservations if it was called
sqliteImportFile() -- do the other DBI packages support file import in
this way via dbWriteTable?

+ seth
Message-ID: <m2odpdp3k1.fsf@fhcrc.org>
In-Reply-To: <74c69e370701050905r287f171bw63d082a82499067e@mail.gmail.com> (David James's message of "Fri, 5 Jan 2007 12:05:39 -0500")

Thread (19 messages)

Seth Falcon SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 3 ronggui SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 3 Seth Falcon SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 4 Seth Falcon SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 4 Seth Falcon SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 4 ronggui SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 4 Dirk Eddelbuettel SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 4 ronggui SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 4 Dirk Eddelbuettel SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 4 Seth Falcon SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 5 ronggui SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 5 David James SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 5 Seth Falcon SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 5 Brian Ripley SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 5 David James SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 5 Seth Falcon SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 5 Seth Falcon SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 5 ronggui SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 6 Seth Falcon SQLite: When reading a table, a "\r" is padded onto the last column. Why? Jan 6