[R] sqldf for Very Large Tab Delimited Files

Gabor Grothendieck ggrothendieck at gmail.com
Fri Feb 3 16:40:48 CET 2012


On Fri, Feb 3, 2012 at 8:08 AM, HC <hcatbr at yahoo.co.in> wrote:
> This is a 160 GB tab-separated .txt file. It has 9 columns and 3.25x10^9
> rows.
>
> Can R handle it?
>

You can process a file N lines at time like this:

con <- file("myfile.dat", "r")
while(length(Lines <- readLines(con, n = N)) > 0) {
  ... whatever...
}

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list