Learn R Programming

OpenRepGrid (version 0.1.9)

formatMatrix: Format a matrix and add index column.

Description

Format a matrix and add index column.

Usage

formatMatrix(x, rnames = rownames(x), pre.index = c(T, F), cnames = seq_len(ncol(x)), indexcol = F, digits = 2, diag = F, mode = 1)

Arguments

x
A matrix onbject.
rnames
Row names.
pre.index
Whether to make index prefix for rows and column names.
cnames
Column names.
indexcol
Whether to make an index column.
diag
Whether to show diagonal.
mode
Whether to show upper (mode=1), lower (mode=2) or both triangles (mode=0) of the matrix.