Skip to content
Prev 174108 / 398503 Next

the quote problem with readLines()

Hi,

Thank you for your concern! 

The file has 136,047,472 lines, with one value in each line, and is 1.7G in
size. I run in a Linux (OpenSuse OS) with 4G memory in total. The error
message is Error: cannot allocate vector of size 2.0 Gb. And the worst thing
is even if I read all the data into R after I truncate the numbers'
precision, i.e. from 1.234567e+00 to 1.2, I cannot manipulate these numbers,
for example, I cannot do ks.test, histogram, kernel density estimator, which
I want to do with these numbers. And after I input commands above, computer
also give error messages like Error: cannot allocate vector of size 809.1
Mb. I can read a half of file, but I want to know the overall distribution
of those numbers, and values in this file is not ordered, and it is not
quite easy to random pick up some numbers or sort them. 

Is these information enough? Thank you again!

Best,
Dongyan
jholtman wrote:
-----
Dongyan Song, Msc
Medical informatics, Uppsala University, Sweden