R/cor2dist.R

"cor2dist" <- function(x) {
   if(dim(x)[1] != dim(x)[2]) {x <- cor(x,use="pairwise")}
   dist <-  sqrt(2*(1-x))
   return(dist)
   }
frenchja/psych documentation built on May 16, 2019, 2:49 p.m.