tr: Trace

View source: R/tr.R

trR Documentation

Trace

Description

Computes the trace of a matrix.

Usage

 tr(a)

Arguments

a

Matrix

Value

t

Trace of A

Author(s)

Maria Antonietta Del Ferraro mariaantonietta.delferraro@yahoo.it
Henk A.L. Kiers h.a.l.kiers@rug.nl
Paolo Giordani paolo.giordani@uniroma1.it

Examples

X <- matrix(rnorm(6*6),ncol=6)
trace <- tr(X)

ThreeWay documentation built on Feb. 9, 2026, 5:08 p.m.

Related to tr in ThreeWay...