[R] Could "incomplete final line found" be more serious than a warning?

Zhou Fang zhou.zfang at gmail.com
Tue May 22 19:38:45 CEST 2012


If you look at the new file in raw mode, you'll see that it's chock full of
ASCII nuls, while the old file has none. This is probably what's giving you
the problems, because R does not allow strings containing embedded nul
characters. (I believe this is because Nul in strings is pretty dangerous in
programming, because they are often used to delimit the end of strings, and
so allowing you to read it in directly can be used for various code
injection exploits.)

To read the new data files, you need some way of dealing with the file as a
raw stream, and stripping out all the nul characters before converting back
to character. Investigate ?readBin...

Zhou

--
View this message in context: http://r.789695.n4.nabble.com/Could-incomplete-final-line-found-be-more-serious-than-a-warning-tp4630932p4630944.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list