[R] Reading large files in R

From: Jean-Pierre Gattuso <gattuso_at_obs-vlfr.fr>
Date: Tue 09 Aug 2005 - 04:50:32 EST

Dear R-listers:

I am trying to work with a big (262 Mb) file but apparently reach a memory limit using R on a MacOSX as well as on a unix machine.

This is the script:

> type=list(a=0,b=0,c=0)
> tmp <- scan(file="coastal_gebco_sandS_blend.txt", what=type,
sep="\t", quote="\"", dec=".", skip=1, na.strings="-99", nmax=13669628) Read 13669627 records
> gebco <- data.frame(tmp)

Error: cannot allocate vector of size 106793 Kb

Even tmp does not seem right:

> summary(tmp)

Error: recursive default argument reference

Do you have any suggestion?

Jean-Pierre Gattuso

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Aug 09 04:55:42 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:45 EST