tr {Correlplot}R Documentation

Compute the trace of a matrix

Description

tr computes the trace of a matrix.

Usage

tr(X)

Arguments

X

a (square) matrix

Value

the trace (a scalar)

Author(s)

Jan Graffelman (jan.graffelman@upc.edu)

Examples

X <- matrix(runif(25),ncol=5)
print(X)
print(tr(X))

[Package Correlplot version 1.1.0 Index]