tr: Trace operator

trR Documentation

Trace operator

Description

Calculates the trace of a square matrix.

Usage

tr(x, ...)

Arguments

x

Square numeric matrix

...

Additional arguments to lower level functions

Value

numeric

Author(s)

Klaus K. Holst

See Also

crossprod, tcrossprod

Examples


tr(diag(1:5))

lava documentation built on Nov. 5, 2023, 1:10 a.m.