R/tr.R

#' Calculate the trace of a matrix.
#'
#' @param mat A matrix.
#' @examples
#' tr(diag(5))
tr<-function(mat){
  sum(diag(mat))
}
stchen3/glmmVCtest documentation built on May 23, 2019, 2:48 p.m.