Skip to content
Prev 82684 / 398513 Next

interruption when pasting code into R under linux

On Tue, 2005-12-13 at 15:50 +0100, Sebastian Leuzinger wrote:
More than likely, you are getting an input buffer overflow. The
arbitrary nature of when this occurs will be dependent upon a variety of
factors, including the complexity of the R code you are pasting and how
fast the R interpreter can process it. 

At some point, a bottleneck is created and the subsequent text in the
input buffer is lost. This behavior is generally intentional to avoid
security risks due to buffer overruns, which is a common method
exploited by folks looking to compromise a system.

See http://en.wikipedia.org/wiki/Buffer_overrun for more information.

You can try to increase the input buffer size for the console to see if
that helps. This will be dependent upon the console app you are using
and the default buffer size in place.

A better solution would be to save the R code in a text file and
source() that file to bring the code into R. See ?source for more
information.

An even better solution, if you are comfortable with emacsen, is to use
ESS. This provides for a more integrated development environment. See:

  http://stat.ethz.ch/ESS/

for more information.

HTH,

Marc Schwartz