dist {coda.base} | R Documentation |
This function overwrites dist
function to contain Aitchison distance between
compositions.
dist(x, method = "euclidean", ...)
x |
compositions method |
method |
the distance measure to be used. This must be one of "aitchison", "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". Any unambiguous substring can be given. |
... |
arguments passed to |
dist
returns an object of class "dist".
See functions 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') # method = 'euclidean' # using Aitchison distance, only relative information is of importance dist(rbind(c(1,1,1), c(100, 100, 100)), method = 'ait') # method = 'aitchison'