R/lowerTriangle.R

Defines functions lowerTriangle

Documented in lowerTriangle

#' Lower triangle of matrix
#' 
#' @description Extract and vectorize lower triangular portion of square matrix
#' @usage lowerTriangle(m)
#' @param m a square matrix
#' @return v a vector containing the lower triangular 
#' @examples
#' mat <- as.matrix(dist(1:10))
#' lowerTriangle(mat)
#' @export lowerTriangle
lowerTriangle <- function(m){
  return(m[lower.tri(m)])
}
markallenthornton/dimest documentation built on June 17, 2018, 12:44 a.m.