Trace {GraphAlignment} | R Documentation |
Calculate the trace of a square matrix.
Trace(m)
m |
square matrix |
The return value is the trace of the input matrix.
Joern P. Meier, Michal Kolar, Ville Mustonen, Michael Laessig, and Johannes Berg
m <- matrix(c(1, 0, 0, 1), 2, 2) Trace(m)