Wide-view using Less in R

Ever have a matrix or data frame with lots of columns and wanted to view it all together instead of chopped up? Here's how:

oldPager <- getOption("pager") options(width=10000) options(pager="less -S")

wideMatrix <- matrix(sample(1:100, 10000, replace=TRUE), ncol=100) page(wideMatrix, method="print")

This will allow you to scroll horizontally with the arrow keys. To go back to the default behavior, run: options(width=80) options(pager=oldPager)

(ALERT! Only applicable in R shells run from the console)

This topic: Main > ViewingWideWithScrolling
Topic revision: 21 Nov 2006, TheresaScott
 
This site is powered by FoswikiCopyright © 2013-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback