[R] R "write" strange behavior in huge file
Maxime Vallee
ValleeM at iarc.fr
Tue Sep 16 15:24:50 CEST 2014
Hello,
In my script I have one list of 1,132,533 vectors (each vector contains
381 elements).
When I use "write" to save this list in a flat text file (I unlist my
list, separate by tabs, and set ncol to 381), I end up with a file of
1,132,535 lines (2 additional lines). I checked back, my R list do not
have those two additional items before writing.
With awk, I determined if lines where not made of 381 fields: there were
two, separated by around 400k lines.
I made sub-files, using those "incomplete" lines as boundaries. My files
are very close in size : 1.9 GB (respectively 1971841853 B and 1972614897
B). It feels like a 32 bit / 64 bit issue.
My R version is this:
./Rscript -e 'sessionInfo()$platform'
[1] "x86_64-unknown-linux-gnu (64-bit)"
There is somewhere, reaching 1.9 GB, something that is changing my tabs to
unwanted carriage returns...
Any idea that might cause this, and if it looks solvable in R?
Cheers,
--Maxime
-----------------------------------------------------------------------
This message and its attachments are strictly confidenti...{{dropped:8}}
More information about the R-help
mailing list