formatMatrix: Format a matrix and add index column.

View source: R/utils.r

formatMatrixR Documentation

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 object.

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.


OpenRepGrid documentation built on May 31, 2023, 5:33 p.m.