Hi, I want to apologize in advance if this has already been asked. I wasn't able to find any information, either on google or from local list search. I'm running an R shell from a linux command line, in an xterm window. Whenever I print a data frame, only the first couple of columns are printed side-by-side, the others are being repositioned below them. It seems something is limiting the line width of the output, even though there is enough horizontal space to fit each row on a single line. For example, this command:> data.frame(matrix(1:30,nrow=1))prints columns 1-21 on the first line, and the rest 22-30 on the second. Is there a way I can configure R to increase the width of my output? Thanks.
you want options(width= ) you can edit your .Rprofile file and the .First function in there to set it when you start R or in the console interactively On Fri, Sep 16, 2011 at 12:48 PM, Mike P <mike.polyakov@gmail.com> wrote:> Hi, > > I want to apologize in advance if this has already been asked. I > wasn't able to find any information, either on google or from local > list search. > > I'm running an R shell from a linux command line, in an xterm window. > Whenever I print a data frame, only the first couple of columns are > printed side-by-side, the others are being repositioned below them. It > seems something is limiting the line width of the output, even though > there is enough horizontal space to fit each row on a single line. > > For example, this command: > > > data.frame(matrix(1:30,nrow=1)) > > prints columns 1-21 on the first line, and the rest 22-30 on the second. > > Is there a way I can configure R to increase the width of my output? > > Thanks. > > ______________________________________________ > R-help@r-project.org 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. >[[alternative HTML version deleted]]
Hi Mike, Look at ?options particularly something like: options(width = 120) 80 is the default, I believe. On 1920 pixels I can comfortably get around 220 (depending on the overhead of the program, full screen, etc.). I imagine it would also be possible to run into limitations from the terminal R is running in, though I do not know that for a fact. Cheers, Josh On Fri, Sep 16, 2011 at 12:48 PM, Mike P <mike.polyakov at gmail.com> wrote:> Hi, > > I want to apologize in advance if this has already been asked. I > wasn't able to find any information, either on google or from local > list search. > > I'm running an R shell from a linux command line, in an xterm window. > Whenever I print a data frame, only the first couple of columns are > printed side-by-side, the others are being repositioned below them. It > seems something is limiting the line width of the output, even though > there is enough horizontal space to fit each row on a single line. > > For example, this command: > >> data.frame(matrix(1:30,nrow=1)) > > prints columns 1-21 on the first line, and the rest 22-30 on the second. > > Is there a way I can configure R to increase the width of my output? > > Thanks. > > ______________________________________________ > R-help at r-project.org 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. >-- Joshua Wiley Ph.D. Student, Health Psychology Programmer Analyst II, ATS Statistical Consulting Group University of California, Los Angeles https://joshuawiley.com/
Possibly Parallel Threads
- Controlling print width settings for 'print' on command line
- patch: automatically adjust width option when terminal is resized
- Gnome-terminal's backslashes look like Ws with a horizontal line through -- how to get a backslash?
- Controling width of boxes in boxplots
- How to center a horizontal legend with specified 'text.width'