Skip to content

question about read.columns

10 messages · Changbin Du, Gabor Grothendieck

#
On Wed, Jun 22, 2011 at 5:45 PM, Changbin Du <changbind at gmail.com> wrote:
Depending on the precise format of the input you might be able to use
read.csv.sql in sqldf.  (You may need to modify the args a bit
relative to what is shown below but the basic idea is hopefully
clear.)  See ?read.csv.sql and also the examples on the sqldf home
page (http://sqldf.googlecode.com) for more info.

library(sqldf)
DF <- read.csv.sql("myfile", header = FALSE, sep = "\t", sql = "select
a1,c1,a11,b11,f111 from file")
#
On Wed, Jun 22, 2011 at 6:01 PM, Changbin Du <changbind at gmail.com> wrote:
Make sure you are using the most recent versions of R, RSQLite and sqldf.
[1] ?0.4.1?
[1] ?0.9.4?
[1] "R version 2.13.0 Patched (2011-06-09 r56106)"
#
On Wed, Jun 22, 2011 at 6:10 PM, Changbin Du <changbind at gmail.com> wrote:
R 2.12 might work but you should certainly update your packages.
#
On Wed, Jun 22, 2011 at 7:07 PM, Changbin Du <changbind at gmail.com> wrote:
You will need to remove the lock file.  Try shutting down any
processes that could be trying to access it *e.g. all R processes and
all shells) and then try removing it again.  If need be change the
file's permissions and/or try as root.