Re: [R] Increasing Console Paste Buffer
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. The point at which the buffer overruns is quite unpredictable and irreproducible, but generally, the slower a program is to interpret its input, the faster the overrun occurs. Editors like vim are likely processing their input much faster than R, and they may therefore be much less prone to this effect. I've seen this phenomenon with rxvt and the fancy terminals that come with Gnome and KDE. The only terminal program with which I've never seen that is xterm -- but that doesn't mean that xterm is entirely proof against such loss of input either. Pasting in larger amounts of code frequently results in a screen which is rather difficult to interpret. More than once, I've been called to help people who didn't get the desired result from pasting code they presumed correct int some terminal, only to find that they were overlooking that error message triggered by line 7 out of 53 lines because that was hidden in the swamp resulting from all the subsequent lines of input and any output triggered by these. One fundamental problem with pasting lines is that the pasted matter will continue to be entered into the interpreter regardless of any errors caused along the way. For these reasons, I generally strongly recommend against pasting into terminals. In R, use the source() instead... ;-) Best regards, Jan -- +- Jan T. Kim ---+ |*NEW*email: [EMAIL PROTECTED] | |*NEW*WWW: http://www.cmp.uea.ac.uk/people/jtk | *-= hierarchical systems are for files, not for humans =-* __ 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
Re: [R] Increasing Console Paste Buffer
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 -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [T] +44 (0)20 7679 5522 ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ 26 Bedford Way[W] http://www.ucl.ac.uk/~ucfagls/ London. WC1H 0AP. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% __ 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
Re: [R] Increasing Console Paste Buffer
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 [EMAIL PROTECTED] 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
Re: [R] Increasing Console Paste Buffer
Sander Oom wrote: 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!? I think it does, doesn't it? R will stop at the first error and print it, e.g. source('c:/temp/test.R') Error in parse(file, n = -1, NULL, ?) : syntax error on line 4 If there were only warnings, it will show them at the end: source('c:/temp/test.R') Warning messages: 1: longer object length is not a multiple of shorter object length in: 1:3 + 1:4 2: longer object length is not a multiple of shorter object length in: 1:3 + 1:4 Even if you use echo=TRUE, these summaries show up at the end. It's only if you use cut and paste that you might miss these. Duncan Murdoch __ 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
Re: [R] Increasing Console Paste Buffer
Indeed it does! Sorry for the impulsive response! Sander. Duncan Murdoch wrote: Sander Oom wrote: 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!? I think it does, doesn't it? R will stop at the first error and print it, e.g. source('c:/temp/test.R') Error in parse(file, n = -1, NULL, ?) : syntax error on line 4 If there were only warnings, it will show them at the end: source('c:/temp/test.R') Warning messages: 1: longer object length is not a multiple of shorter object length in: 1:3 + 1:4 2: longer object length is not a multiple of shorter object length in: 1:3 + 1:4 Even if you use echo=TRUE, these summaries show up at the end. It's only if you use cut and paste that you might miss these. Duncan Murdoch __ 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 -- 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 [EMAIL PROTECTED] 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
[R] Increasing Console Paste Buffer
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 __ 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
Re: [R] Increasing Console Paste Buffer
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? If this is the case, then, and again I assume you are using Gnome (default in FC) as the desktop system, then open a terminal. The Edit Current Profile in the menu bar for the terminal. Select the Scrolling Tab. Alter Scrollback lines and kilobytes accordingly to suit. You only need to do one, not both - I find it easier to think in numbers of lines so I changed that. You'll have to modify this if you use KDE or another window manager with FC3. HTH Gavin __ 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