Learn R Programming

powertools (version 1.0.0)

matrix.format: Internal-use function for displaying matrices in function outputs

Description

Internal-use function for displaying matrices in function outputs

Usage

matrix.format(matrix = NULL, nspaces = 18)

Value

The matrix printed as a string with rows separated by newline.

Arguments

matrix

The matrix to be displayed.

nspaces

The number of white spaces before the matrix; defaults to 18.

Examples

Run this code
matrix <- matrix(c(1, 2, 3, 4), nrow = 2)
matrix.format(matrix = matrix)

Run the code above in your browser using DataLab