R/matrixConvert.R

Defines functions matrixConvert

Documented in matrixConvert

matrixConvert <- function(triMatrix, colname = c("sp1","sp2","dist")){
  m <- as.matrix(triMatrix)
  m2 <- reshape2::melt(m)[reshape2::melt(upper.tri(m))$value,]
  names(m2) <- colname
  invisible(m2)
}

Try the otuSummary package in your browser

Any scripts or data that you put into this service are public.

otuSummary documentation built on Sept. 8, 2023, 6:05 p.m.