[R] Reading large files in R

Jean-Pierre Gattuso gattuso at obs-vlfr.fr
Mon Aug 8 20:50:32 CEST 2005


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?

Thanks,
Jean-Pierre Gattuso




More information about the R-help mailing list