Calculates the trace of a matrix
returns the sum of the diagonal elements
M <- matrix(sample(1:9), 3,3)
Questions? Problems? Suggestions? Tweet to @rdrrHQian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.