Learn R Programming

compositions (version 2.0-4)

dist: Distances in variouse approaches

Description

Calculates a distance matrix from a data set.

Usage

dist(x,...)
# S3 method for default
dist(x,...)

Value

a distance matrix

Arguments

x

a dataset

...

further arguments to dist

Author

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

Details

The distance is computed based on cdt

See Also

aplus

Examples

Run this code
data(SimulatedAmounts)
phc <- function(d) { plot(hclust(d))}
phc(dist(iris[,1:4]))
phc(dist(acomp(sa.lognormals),method="manhattan"))
phc(dist(rcomp(sa.lognormals)))
phc(dist(aplus(sa.lognormals)))
phc(dist(rplus(sa.lognormals)))

Run the code above in your browser using DataLab