Top K elements of a vector.

Returns the sum of the diagonal elements of a matrix.

1 | ```
tr(X)
``` |

`X` |
A matrix whose diagonal elements will be added together. |

This returns the trace of a matrix, which is just the sum of its diagonal elements.

The sum of the diagonal elements of X.

Peter Hoff.

1 2 3 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@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.