tr | R Documentation |
Calculates the trace of a square numeric matrix, i.e., the sum of its diagonal elements
tr(X)
X |
a numeric matrix |
a numeric value, the sum of diag(X)
X <- matrix(1:9, 3, 3)
tr(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.