Re: [R] Increasing Console "Paste Buffer"

From: Gavin Simpson <>
Date: Wed 01 Jun 2005 - 20:29:59 EST

Jan T. Kim wrote:

> On Tue, May 31, 2005 at 11:47:05PM +0100, Gavin Simpson wrote:

>>Manuel Morales wrote:
>>>Hello list.
>>>I'm using R from the gnome-terminal in Fedora. My preference is to write
>>>programs in VIM, and then source the file from R, or copy and paste the
>>>lines into the console. I'm wondering if there is a way to increase the
>>>"paste buffer" as an alternative to "sourcing" large analyses. As was
>>>mentioned in a recent thread on Linux GUI's, I find that if I paste in a
>>>large amount of text, the lines end up getting cut off at some point. I
>>>wonder if this is an R restriction, because it seems like I am able to
>>>paste substantially more text in other console-based programs. Is there
>>>any way to increase the amount of text that I can paste into an R
>>Maybe I misunderstand what you mean by "lines end up getting cut off at
>>some point" so correct me if I got it wrong, but I assume you mean that
>>after a certain number of lines entered you can no longer scroll back up
>>and view the earlier lines?
> I think that this is not an issue of the scroll buffer, but of buffers
> internal to the terminal program or the shell, which are designed to hold
> keyboard input and which can be overwhelmed by the rate of input when
> large text selections are pasted in, as this appears as though thousands
> of keys had been typed almost instantaneously from their view, so to speak.

I did say I was guessing :-)

> For these reasons, I generally strongly recommend against pasting into
> terminals.

Thanks for this Jan. I haven't noticed this myself but then again I hate copy/paste and rarely use R outside emacs/ess these days.

> In R, use the source() instead... ;-)

Agreed. source("filename", echo = TRUE) will sort of replicate the behaviour the original poster would get if they like to see the commands printed among the results. But if he is pasting in that much data, Manuel will still have to increase the buffer on the terminal, especially if he is using one of the defaults in FC3 as the output will quickly get lost.

> Best regards, Jan

All the best,


Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E]
UCL Department of Geography       [W]
26 Bedford Way                    [W]
London.  WC1H 0AP.

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Wed Jun 01 20:40:55 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:20 EST