Learn R Programming

VCA (version 1.5.1)

Trace: Compute the Trace of a Matrix

Description

Function computes the sum of main-diagonal elements of a square matrix.

Usage

Trace(x, quiet = FALSE)

Value

(numeric) value, the trace of the matrix

Arguments

x

(matrix, Matrix) object

quiet

(logical) TRUE = will suppress any warning, which will be issued otherwise