[R] Data.frame columns in R console

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Feb 9 09:38:24 CET 2007


On Fri, 9 Feb 2007, Lauri Nikkinen wrote:

> Thank you for your answer. When I set options(width=250) I still get the
> same result when I print the data.frame on my Rgui console (R 2.4.1, Windows
> XP). Colums become underneath each other. I also get an error (?) message [
> reached getOption("max.print") -- omitted 3462 rows ]]. For example if I
> have a data.frame with 4000 rows and 200 columns I would like to be able to
> use scroll bars in Rconsole to investigate the whole data.frame.

200 columns will take far more than 250 characters.  The help says

      'width': controls the number of characters on a line. You may want
           to change this if you re-size the window that R is running
           in.  Valid values are 10...10000 with default normally 80.

I would use the spreadsheet view of edit(mydf) in preference.


> btw, R is very useful system, my sincere thanks goes to R developers!
>
>
>
> -Lauri
>
>
> 2007/2/8, Prof Brian Ripley <ripley at stats.ox.ac.uk>:
>>
>> ?options, look for 'width'.
>>
>> I don't know what OS this in: the Windows Rgui has an option to set the
>> width to the width of the console, but you can override it.
>>
>> On Thu, 8 Feb 2007, Lauri Nikkinen wrote:
>>
>>> Hi R-users,
>>>
>>>
>>>
>>> A newbie question: assume that I have for example 30 columns in my
>>> data.frame named DF. When I print DF in R console I get columns that
>> don't
>>> fit on the same row underneath each other. So how do I change the R
>> console
>>> preferences so that the console does not wrap my data.frame columns? I
>> want
>>> the columns to be printed next to each other, as in a normal table.
>>>
>>>
>>>
>>> Cheers,
>>>
>>> Lauri
>>>
>>>       [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> R-help at 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
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>
>> --
>> Brian D. Ripley,                  ripley at stats.ox.ac.uk
>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>> University of Oxford,             Tel:  +44 1865 272861 (self)
>> 1 South Parks Road,                     +44 1865 272866 (PA)
>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list