distpar {amap}R Documentation

Parallelized Distance Matrix Computation

Description

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

Usage

distpar(x, method = "euclidean", nbproc = 2, diag = FALSE, upper = FALSE)

Arguments

x numeric matrix or (data frame) or an object of class "exprSet". Distances between the rows of x will be computed.
method the distance measure to be used. This must be one of "euclidean", "maximum", "manhattan", "canberra", "binary", "pearson", "correlation" or "spearman". Any unambiguous substring can be given.
nbproc integer, Number of subprocess for parallelization
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.

Value

An object of class "dist".

References

Antoine Lucas and Sylvain Jasson, Using amap and ctc Packages for Huge Clustering, R News, 2006, vol 6, issue 5 pages 58-60.

See Also

Dist

Examples

x <- matrix(rnorm(100), nrow=5)

## compute dist with 8 threads
distpar(x,nbproc=8)

## compute pearson dist with 8 threads
distpar(x,nbproc=8,method="pearson")


[Package amap version 0.7-3 Index]