Rdocumentation
powered by
Learn R Programming
emulator (version 1.1-5)
tr: Trace of a matrix
Description
Returns the trace of a matrix
Usage
tr(a)
Arguments
a
Matrix whose trace is desired
Examples
Run this code
tr(matrix(
1
:
9
,
3
,
3
))
Run the code above in your browser using
DataLab