[R] Input buffer overflow

Gabor Grothendieck ggrothendieck at gmail.com
Tue Oct 17 23:47:22 CEST 2006


No one answered this question but to answer my own question I did notice
that since I  posted this, there have been changes to parse.Rd in the
development version of R:

  https://svn.r-project.org/R/trunk/src/library/base/man/parse.Rd

indicating:

  "a limit of 8192 bytes on the size of strings which can be parsed."

On 10/15/06, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:
> In gsubfn I replace matches with strings that represent calls to a function
> and then perform paste(eval(parse(text= ...)), collapse = "") on the result.
> One user of gsubfn is using it with very long strings (over 20,000 characters)
> and the parse is giving an input buffer overflow.  Here is an
> artificial example:
>
>   > s <- paste(rep("X", 25000), collapse = "")
>   > out <- parse(text = shQuote(s))
>   Error in parse(text = shQuote(s)) : input buffer overflow
>
> Is there a way to increase the limit?
>



More information about the R-help mailing list