tr: Trace

View source: R/utils.R

trR Documentation

Trace

Description

Return the mathematical trace of a matrix, the sum of its diagonal elements.

Usage

tr(M)

Arguments

M

The matrix from which to calculate the trace.

Value

The trace of the matrix.


optedr documentation built on June 23, 2026, 5:07 p.m.