Introduction
Theory, R functions & Examples
dist
- offers just limited number of distance measures - e.g. euclidean
, canberra
and manhattan
. The result is the distance matrix, an object of the class dist
. vegdist
(library vegan
) - default distance used in this function is Bray-Curtis distance, which is (in contrast to Euclidean distance) considered as more suitable for ecological data (it is a quantitative analog of Sørensen dissimilarity).dsvdis
(library labdsv
) - offers some other indices than vegdist
, e.g. ruzicka
(Růžička, quantitative analogue of Jaccard) and roberts
. For full comparison of dist
, vegdist
and dsvdis
, see Table 1 in the website of Dave Roberts. dist.ldc
(library adespatial
) - includes 21 dissimilarity indiced described in Legendre & De Cáceres (2013), twelve of which are not readily available in other packages. Note that Bray-Curtis dissimilarity is called percentage difference (method = “percentdiff”
). By default returns also informative message whether given dissimilarity index is Euclidean or not and whether it becomes Euclidean if square-rooted (as is the case of e.g. Bray-Curtis aka Percentage difference index).designdist
(library vegan
) - allows to design virtually any distance measure using the formula for their calculation.daisy
(library cluster
) - offers euclidean, manhattan and gower distance.distance
(library ecodist
) - contains seven distance measures, but the function more than for practical use is for a demonstration of the script (for larger matrices, the calculation takes rather long).