matrix.trace: Compute the trace of a matrix

View source: R/glmm.R

matrix.traceR Documentation

Compute the trace of a matrix

Description

Exactly what it says on the tin - compute the sum of the matrix diagonal

Usage

matrix.trace(x)

Arguments

x

A matrix

Details

It computes the matrix trace of a square matrix.

Value

numeric scalar of the matrix trace.

Author(s)

Mike Morgan

Examples

matrix.trace(matrix(runif(9), ncol=3, nrow=3))


MarioniLab/miloR documentation built on Oct. 18, 2024, 6:04 p.m.