Learn R Programming

ramify (version 0.3.3)

pprint: Pretty Printing

Description

Prettier printing for matrices and data frames.

Usage

pprint(x, ...)
"pprint"(x, rowdots = NULL, coldots = NULL, digits = NULL, ...)
"pprint"(x, rowdots = NULL, coldots = NULL, digits = NULL, ...)

Arguments

x
An object of class "matrix" or "data.frame".
...
Additional optional arguments. None are used at present.
rowdots
Integer specifying the row to replace with ... notation. Default is 4.
coldots
Integer specifying the column to replace with ... notation. Default is 4.
digits
The minimum number of significant digits to be printed in values.

Details

For object of class "matrix" or "data.frame" (which are coerced to a matrix via the data.matrix function), 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.

Examples

Run this code
pprint(randn(100, 100))
pprint(resize(1:100, 10, 10))

Run the code above in your browser using DataLab