powered by
Computes the trace of a numeric or character matrix.
numeric
character
mxtr(x)
numeric or character matrix.
numeric or character.
Guidotti, E. (2020). "calculus: High dimensional numerical and symbolic calculus in R". https://arxiv.org/abs/2101.00086
Other matrix algebra: mxdet(), mxinv(), mx()
mxdet()
mxinv()
mx()
# NOT RUN { ### numeric matrix x <- matrix(1:4, nrow = 2) mxtr(x) ### character matrix x <- matrix(letters[1:4], nrow = 2) mxtr(x) # }
Run the code above in your browser using DataLab