print_square_matrix: Print a square matrix in well readable format

View source: R/measures.r

print_square_matrixR Documentation

Print a square matrix in well readable format

Description

Helper function to produce output for square matrices, e.g. distance matrices etc. Adds a (trimmed) name and index column. Displays upper triangle only by default. The function is used inside the print method of several classes.

Usage

print_square_matrix(
  x,
  names = NA,
  trim = NA,
  index = TRUE,
  width = NA,
  upper = TRUE
)

Arguments

x

A square matrix.

names

names A vector of row names.

trim

Trimmed length of names (numeric).

index

Whether to add an index columns (default TRUE).

width

Column width of output (numeric).

upper

Whether to only show the upper triangle (default TRUE).


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