#' Calculate the trace of a matrix. #' #' @param mat A matrix. #' @examples #' tr(diag(5)) tr<-function(mat){ sum(diag(mat)) }
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.