powered by
Computes the trace of a square numeric matrix A.
tr(A)
Square matrix.
Other matrix: special.matrix, vec()
special.matrix
vec()
A <- matrix(seq(1, 16, 1), nrow = 4, byrow = TRUE) A tr(A) tr(I(3))
Run the code above in your browser using DataLab