Learn R Programming

asbio (version 0.3-42)

get.dist: Calculates 26 possible resemblance measures.

Description

This function allows users access to 26 resemblance measures . This includes five not previously available in R. Many of the measures are programmed with the function designdist from library vegan. 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", "czekanows
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).

References

Aho, K. In prep. Applied statistics for biologists, a textbook using R. 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