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 April 17, 2020, 1:27 a.m.