corDist {SLmisc}R Documentation

Correlation Distance Matrix Computation

Description

The function computes and returns the correlation and absolute correlation distance matrix computed by using the specified distance measure to compute the distances between the rows of a data matrix.

Usage

corDist(x, method = "pearson", diag = FALSE, upper = FALSE, abs = FALSE, 
          use = "pairwise.complete.obs")

Arguments

x a numeric matrix or data frame
method the correlation distance measure to be used. This must be one of "pearson", "spearman", "kandall" or "cosine". Any unambiguous substring can be given.
diag logical value indicating whether the diagonal of the distance matrix should be printed by 'print.dist'.
upper logical value indicating whether the upper triangle of the distance matrix should be printed by 'print.dist'.
abs logical, compute absolute correlation distances
use character, correponds to argument use of function cor

Details

The function computes the Pearson, Spearman, Kendall or Cosine sample correlation and absolute correlation; confer Section 12.2.2 of Gentleman et al (2005). For more details about the arguments we refer to functions dist and cor.

Value

'corDist' returns an object of class "dist"; cf. dist.

Author(s)

Dr. Matthias Kohl (SIRS-Lab GmbH) kohl@sirs-lab.com

References

Gentleman R. Ding B., Dudoit S. and Ibrahim J. (2005) Distance Measures in DNA Microarray Data Analysis. In: Gentleman R., Carey V.J., Huber W., Irizarry R.A. and Dudoit S. (editors) Bioinformatics and Computational Biology Solutions Using R and Bioconductor. Springer.

See Also

plot.cor

Examples

## only a dummy example
M <- cor(matrix(rnorm(1000), ncol = 20))
D <- corDist(M)

[Package SLmisc version 1.4.1 Index]