tr: trace of a matrix

View source: R/tr.R

trR Documentation

trace of a matrix

Description

Give the trace of a squire matrix.

Usage

tr(X)

Arguments

X

squire matrix.

Details

It is essentially "sum(diag(X))" but faster.

Value

scalor

Note

First version: Wed Dec 29 16:25:04 CET 2010; Current: Wed Dec 29 16:25:10 CET 2010.

Author(s)

Feng Li, Department of Statistics, Stockholm University, Sweden.


thiyangt/fformpp documentation built on Jan. 5, 2024, 5:44 a.m.