Learn R Programming

asbio (version 0.2-1)

D.sq: Mahalanobis distance for two sites using a pooled covariance matrix

Description

Allows much easier multivariate comparisons of groups of sites then provided by the function mahalanobis in the base library.

Usage

D.sq(g1, g2)

Arguments

g1
Community vector for site 1
g2
Community vector for site 2

References

Legendre, P, and L. Legendre (1998) Numerical ecology, 2nd English edition. Elsevier, Amsterdam, The Netherlands.

See Also

mahalanobis

Examples

Run this code
g1<-matrix(ncol=3,nrow=3,data=c(1,0,3,2,1,3,4,0,2))
g2<-matrix(ncol=3,nrow=3,data=c(1,2,4,5,2,3,4,3,1))
D.sq(g1,g2)$D.sq

Run the code above in your browser using DataLab