[Rd] String Length Limit (PR#1040)

Prof Brian Ripley ripley@stats.ox.ac.uk
Mon, 6 Aug 2001 17:08:17 +0100 (BST)

On Fri, 3 Aug 2001 possolo@crd.ge.com wrote:

> Full_Name: Antonio Possolo
> Version: 1.3.0
> OS: Linux
> Submission from: (NULL) (
> 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 SPARC) does not suffer from this behavior.

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)

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

Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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