Learn R Programming

DiffCorr (version 0.4.4)

cor.dist: Additional distance functions correlation distance (1-r)

Description

Additional distance functions Correlation distance (1-r)

Usage

cor.dist(data, methods = "pearson", absolute = FALSE)

Value

the resulting correlation matrix

Arguments

data

a data matrix ([data.frame object] row: metabolites, col: samples or replicates)

methods

a character string indicating which correlation coefficient is to be calculated. One of "pearson" (default), "spearman", or "kendall" can be abbreviated.

absolute

TRUE means that absolute value of the correlation coefficient is used (Default: FALSE).

Author

Atsushi Fukushima

Details

These functions were originally from 'hybridHclust' package. We modified the functions slightly. See also the reference manual in detail.

Examples

Run this code
cor.dist(as.matrix(t(iris[,1:4])))

Run the code above in your browser using DataLab