Re: [R] Increasing Console "Paste Buffer"

From: Sander Oom <slist_at_oomvanlieshout.net>
Date: Wed 01 Jun 2005 - 20:49:52 EST

An interesting thought just came to me when reading this discussion! I use both R and Latex and have never had the trouble of overlooking error messages when debugging long Latex code!

Of course this is because when compiling a latex document, a summary of the compilation process is provided at the end! If any errors occurred, they will be mentioned in the summary.

Maybe R could provide the same summary as an optional part of the source() command!?

Cheers,

Sander.

Gavin Simpson wrote:
> 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
>>>> session?
>>>>
>>>> Thanks!
>>>>
>>>> Manuel
>>>>
>>>
>>> Manuel,
>>>
>>> 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,
>
> Gav
>
-- 
--------------------------------------------
Dr Sander P. Oom
Animal, Plant and Environmental Sciences,
University of the Witwatersrand
Private Bag 3, Wits 2050, South Africa
Tel (work)      +27 (0)11 717 64 04
Tel (home)      +27 (0)18 297 44 51
Fax             +27 (0)18 299 24 64
Email   sander@oomvanlieshout.net
Web     www.oomvanlieshout.net/sander

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed Jun 01 20:56:21 2005

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