File: distfuns.R

package info (click to toggle)
r-cran-heatmaply 1.5.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 628 kB
  • sloc: sh: 13; makefile: 2
file content (7 lines) | stat: -rw-r--r-- 187 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
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")