R/distfuns.R

Defines functions corr_dist

corr_dist <- function(method) {
  function(x) as.dist(1 - cor(t(x), method = method))
}

pearson <- corr_dist("pearson")
spearman <- corr_dist("spearman")
kendall <- corr_dist("kendall")

Try the heatmaply package in your browser

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

heatmaply documentation built on Oct. 7, 2023, 1:07 a.m.