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 Nov. 18, 2022, 5:12 p.m.