| dist | R Documentation |
Compute a distance matrix for compositional data, including the Aitchison
distance as an extension of dist.
dist(x, method = "euclidean", ...)
x |
A data matrix whose rows are compositions. |
method |
The distance measure to be used. This must be one of
|
... |
Additional arguments passed to |
An object of class "dist".
dist
X <- exp(matrix(rnorm(10 * 50), ncol = 50, nrow = 10))
(d <- dist(X, method = "aitchison"))
plot(hclust(d))
# In contrast to Euclidean distance
dist(rbind(c(1, 1, 1), c(100, 100, 100)), method = "euc")
# Using Aitchison distance, only relative information is of importance
dist(rbind(c(1, 1, 1), c(100, 100, 100)), method = "ait")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.