Skip to content

String Length Limit (PR#1040)

2 messages · possolo@crd.ge.com, Brian Ripley

#
Full_Name: Antonio Possolo
Version: 1.3.0
OS: Linux
Submission from: (NULL) (192.35.44.3)


If one attempts to read a character string from a file using scan,
and the string comprises more than 8190 characters, then the string
is truncated to this length, and no warning is issued.

I've observed this both in the Linux and Win implementations of R 1.3.0.
S-PLUS (v. 6.0 rel. 1 for Sun SPARC0 does not suffer from this behavior. 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
3 days later
#
On Fri, 3 Aug 2001 possolo@crd.ge.com wrote:

            
Although readLines is normally to be preferred (in R and S-PLUS 6: it's a
lot faster for a start), we've fixed this so that scan() in

R 1.3.1 will give a warning
R 1.4.0 will allow unlimited lines (unlimited by R, that is).

As ever, previews are in r-patched and r-devel (tar bundles/rysnc)
respectively.

The 1.4.0 version needed quite a lot of re-writing of code, too much for a
patch release.