Learn R Programming

asbio (version 0.2-1)

get.dist: Calculates 26 possible resemblance measures.

Description

This function allows users access to all 26 resemblance measures shown in Table 29.10. This includes five not previously available in R. Many of the measures are programmed with the function designdist from library vegan. The methods can be specified by name or by the distance measure number they were given in Table 29.10; e.g. Steinhaus index = "D8". Minkowski's distance requires an additional specification for power. The default is power = 2 which makes the measure equivalent to Euclidean distance.

Usage

get.dist(data, method, minkowski.power = 2)

Arguments

data
A matrix for which resemblances between rows will be calculated
method
One of twenty six possible resemblance measures. These are: "matching", "rogers", "jaccard.pa", "sorenson", "kulkczynski.pa", "ochiai", "gower", "steinhaus", "kulkczynski.q", "jaccard.q", "euclidean", "rel.euclidean", "manhattan", "czekan
minkowski.power
Minkowski's distance requires a specification for power. The default is minkowski.power = 2 which makes the measure equivalent to Euclidean distance.

Value

  • Returns a matrix of class(dist).

Details

See Ch. 29 for descriptions of resemblance measures.

References

Legendre, P, and Legendre, L. (1998) Numerical ecology, 2nd English edition. Elsevier, Amsterdam, The Netherlands. Oksanen, J., Kindt, R., Legendre, P., O'Hara, B., Simpson, G. L., and Stevens, M. H. H. (2008) vegan: community ecology package. R package version 1.13-0. http://vegan.r-forge.r-project.org

See Also

dist

Examples

Run this code
library(vegan)
data(varespec)
get.dist(varespec,method="steinhaus")

Run the code above in your browser using DataLab