[R] Console display "buffer size"

(Ted Harding) Ted.Harding at wlandres.net
Tue Apr 2 00:06:25 CEST 2013


On 01-Apr-2013 21:26:07 Robert Baer wrote:
> On 4/1/2013 4:08 PM, Peter Ehlers wrote:
>> On 2013-04-01 13:37, Ted Harding wrote:
>>> Greetings All.
>>> This is a somewhat generic query (I'm really asking on behalf
>>> of a friend who uses R on Windows, whereas I'm on Linux, but
>>> the same phenomenon appears on both).
>>>
>>> Say one has a largish dataframe -- call it "G" -- which in the
>>> case under discussion has 592 rows and 41 columns. The intention
>>> is to display the data by simply entering its name (G) as command.
>>>
>>> Say the display console has been set wide enough to display 15
>>> columns (determined by lengths of column names). Then R will output
>>> succesively to the console, in continuous flow:
>>>    Chunk 1: rows 1:592 of columns 1:15
>>>    Chunk 2: rows 1:592 of columns 16:30
>>>    Chunk 3: rows 1:592 of columns 31:41
>>> If the number of rows that can be displayed on the screen is, say, 60,
>>> then only rows 533:592 of Chunk 3 will be visible in the first instance.
>>>
>>> However, on my Linux system at any rate, I can use Shift+PgUp to
>>> scroll back up through what has been output to the console. It seems
>>> that my friend proceeds similarly.
>>>
>>> But now, after a certain number of (Shift+PgUps), one runs out
>>> of road before getting to Row 1 of Chunk 1 (in my friend's case,
>>> only Rows 468-592 of Chunk 1 can be seen).
>>>
>>> The explanation which occurs to me is that the console has a "buffer"
>>> in which such an output is stored, and if the dataframe is too big
>>> then lines 1:N (for some N) of the output are dropped from the start
>>> of the buffer, and it is impossible to go further back than line (N+1)
>>> of Chunk 1 where in this case N=467 (of course one may not even be
>>> able to go further back than Chunk K, for some K > 1, for a bigger
>>> dataframe).
>>>
>>> The query I have is: In the light of the above, is there a way to
>>> change the size of the "buffer" so that one can scroll all the way
>>> back to the very first row of Chunk 1? (The size-change may perhaps
>>> have to be determined empirically).
>>
>> Isn't this set by the 'bufbytes' and 'buflines' specifications in the
>> Rconsole file?
>> Anyway, it's probably best to use 'View' to inspect data.
>>
> Although I have not tried them, Windows RGUI  [ -- Edit | GUI 
> Preferences --] has settings for both buffer and lines which on my 
> 64-bit machine default to 250000 and 8000 respectively.
> 
> Rob Baer
> 
>> Peter Ehlers

Thanks for the replies, Rob and Peter. Rob's reply in particular
corresponds to what my friend has himself just found out in his
Windows installation of R. It seems, however, that this setting
is once-and-for-all in an R session (I can't check that myself).

Re Peter's comment: I don;t seem to have an "Rconsole" file
anywhere in my Linux installation. Is it unique to Windows?

Once again, thanks. Very helpful.
Ted.

-------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at wlandres.net>
Date: 01-Apr-2013  Time: 23:06:21
This message was sent by XFMail



More information about the R-help mailing list