Skip to content
Prev 199773 / 398502 Next

Error: cannot allocate vector of size...

On Tue, 10 Nov 2009, maiya wrote:

            
Your data are stored on disk as a text file (in CSV format, in fact), not as numbers. This can take up less space.
A better solution is probably to read a subset of the columns at a time.  The easiest way to do this is probably to read the data into a SQLite database with the 'sqldf' package, but another solution is to use the colClasses= argument to read.table() and specify "NULL" for the classes of the columns you don't want to read. There are other ways as well.

It might even be faster to do the cross-tabulations in a database and read the resulting summaries into R to compute any statistics you need.
Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle