[R] how to print table with more columns per row?

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jul 20 17:51:56 CEST 2006


This is controlled by options(width): characters not columns.

On Thu, 20 Jul 2006, ryszard.czerminski at novartis.com wrote:

> When printing a table it is broken at some point (depending how long are 
> the associated names)
> >>> see example below.
> 
> Is there a way to control number of columns being printed for a given 
> chunk of the table?
> 
> Best regards,
> Ryszard
> 
> > z5
>         AAAAAAA BBBBBBB CCCCCCC DDDDDDD EEEEEEE FFFFFFF GGGGGGG HHHHHHH 
> IIIIIII
> AAAAAAA    1.00   -0.69   -0.54   -0.88      NA      NA      NA      NA 
> -0.88
> BBBBBBB   -0.69    1.00    0.65    0.82      NA      NA      NA       1 
> 0.83
> CCCCCCC   -0.54    0.65    1.00    0.49      NA      NA      NA      NA 
> 0.94
> DDDDDDD   -0.88    0.82    0.49    1.00      NA      NA      NA       1 
> 0.90
> EEEEEEE      NA      NA      NA      NA      NA      NA      NA      NA  
> NA
> FFFFFFF      NA      NA      NA      NA      NA      NA      NA      NA  
> NA
> GGGGGGG      NA      NA      NA      NA      NA      NA      NA      NA  
> NA
> HHHHHHH      NA    1.00      NA    1.00      NA      NA      NA       1  
> NA
> IIIIIII   -0.88    0.83    0.94    0.90      NA      NA      NA      NA 
> 1.00
> JJJJJJJ      NA      NA      NA      NA      NA      NA      NA      NA  
> NA
> KKKKKKK    0.05    0.21    0.11   -0.11      NA      NA      NA       1  
> NA
> LLLLLLL    0.73   -0.68   -0.16   -0.91      NA      NA      NA      -1 
> -0.35
>         JJJJJJJ KKKKKKK LLLLLLL
> AAAAAAA      NA    0.05    0.73
> BBBBBBB      NA    0.21   -0.68
> CCCCCCC      NA    0.11   -0.16
> DDDDDDD      NA   -0.11   -0.91
> EEEEEEE      NA      NA      NA
> FFFFFFF      NA      NA      NA
> GGGGGGG      NA      NA      NA
> HHHHHHH      NA    1.00   -1.00
> IIIIIII      NA      NA   -0.35
> JJJJJJJ      NA      NA      NA
> KKKKKKK      NA    1.00    0.24
> LLLLLLL      NA    0.24    1.00
> >
> 
> CONFIDENTIALITY NOTICE\ \ The information contained in this ...{{dropped}}
> 
> ______________________________________________
> 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