Gabor, maybe some of my code is wrong (I don't know sql at all). I tried the following with just a few lines as a test: library(sqldf) mydata<-read.csv.sql("myfile.txt",sep="|", sql = "select * from file 200, 100") But it's just hanging. The same happened when I wrote: mydata<-read.csv.sql("myfile.txt",sep="|", eol = "\n",sql = "select * from file 200, 100")
I am not sure if I should use eol. My file is a .txt file and the delimiter is "|". At the end of the line there is just the last entry, nothing else (at least not visible). Thank you for your help! Dimitri On Fri, Oct 22, 2010 at 9:53 PM, Gabor Grothendieck <ggrothendi...@gmail.com> wrote: > On Fri, Oct 22, 2010 at 9:45 PM, Dimitri Liakhovitski > <dimitri.liakhovit...@gmail.com> wrote: >> Gabor, >> thanks a lot - sqldf might be a solution. However, do you know if >> sqldf can also read in .txt files (with different delimiters)? >> The data I am dealing with is "|" - delimited. So, I was using >> read.table(...,sep="|") >> I looked at sqldf description - but did not see examples with .txt. >> > > Yes, it accepts sep and the other arguments specifically documented in > ?read.csv.sql > > -- > Statistics & Software Consulting > GKX Group, GKX Associates Inc. > tel: 1-877-GKX-GROUP > email: ggrothendieck at gmail.com > -- Dimitri Liakhovitski Ninah Consulting www.ninah.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.