powered by
Calculates the trace of a square matrix.
tr(x, ...)
numeric
Square numeric matrix
Additional arguments to lower level functions
Klaus K. Holst
crossprod, tcrossprod
crossprod
tcrossprod
tr(diag(1:5))
Run the code above in your browser using DataLab