pprint | R Documentation |
Prettier printing for matrices and data frames.
pprint(x, ...)
## S3 method for class 'matrix'
pprint(x, rowdots = NULL, coldots = NULL, digits = NULL, ...)
## S3 method for class 'data.frame'
pprint(x, rowdots = NULL, coldots = NULL, digits = NULL, ...)
x |
A matrix or data.frame. |
... |
Additional optional arguments. None are used at present. |
rowdots |
Integer specifying the row to replace with |
coldots |
Integer specifying the column to replace with |
digits |
The minimum number of significant digits to be printed in values. |
For a matrix or data.frame (which are coerced to a matrix via
data.matrix, pprint()
will replace all the rows starting from rowdots
up to and including the second-to-last row with a single row filled with
...
s. The same is applied to the columns as well. Hence a large matrix
(or data.frame) will be printed in a much more compact form.
pprint(randn(100, 100))
pprint(resize(1:100, 10, 10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.