[R] R tools for large files

Jim Rogers jrogers at cantatapharm.com
Mon Aug 25 15:47:30 CEST 2003


>>> I'm wondering if anyone has written some functions or code for 
>>> handling
>>> very large files in R. I am working with a data file that is 41 
>>> variables times who knows how many observations making up 27MB
altogether.
>>> 
>>> The sort of thing that I am thinking of having R do is
>>> 
>>> - count the number of lines in a file
>>
>>You can do that without reading the file into memory: use 
>>system(paste("wc -l", filename))
>
>Don't think that I can do that in Windows XL.

There are many ports of unix tools for windows, a recommended collection
for R kindly provided here:

http://www.stats.ox.ac.uk/pub/Rtools/tools.zip

This includes "wc".

Cheers, 
Jim 

James A. Rogers, Ph.D. <rogers at cantatapharm.com>
Statistical Scientist
Cantata Pharmaceuticals
300 Technology Square, 5th floor
Cambridge, MA  02139
617.225.9009 x312
Fax 617.225.9010




More information about the R-help mailing list