tr | R Documentation |
Computes the trace of a square numeric matrix A.
tr(A)
A |
Square matrix. |
If the argument is not a square numeric matrix, the function presents an error and terminates.
Other matrix:
special.matrix
,
vec()
A <- matrix(seq(1, 16, 1), nrow = 4, byrow = TRUE) A tr(A) tr(I(3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.