R/dcor.R

Defines functions dcor

Documented in dcor

dcor<- function(x){
########## Correlation distance between pairs of objects ##################
# Input:
# x: data matrix
#
# Output:
# d: distance matrix
###########################################################################
    d <- sqrt(1-cor(t(x)))
    d <- as.dist(d)
    return(d)
}

Try the ICGE package in your browser

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

ICGE documentation built on Aug. 8, 2025, 6:11 p.m.