tr {ToolsForCoDa}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 ToolsForCoDa version 1.0.6 Index]