vegclust (version 2.0.2)

vegdiststruct: Structural and compositional dissimilarity


Function to calculate the dissimilarity between ecological communities taking into account both their composition and the size of organisms.


vegdiststruct(x, y=NULL, paired=FALSE, type="cumulative", method="bray", 
              transform=NULL, classWeights=NULL)


Returns an object of class 'dist'.



A stratified vegetation data set (see function stratifyvegdata), a set of cummulative abundance profiles (see function CAP) or a set of cummulative abundance surfaces (see function CAS).


A second stratified vegetation data set (see function stratifyvegdata), a second set of cummulative abundance profiles (see function CAP) or a second set of cummulative abundance surfaces (see function CAS) against which object x should be compared.


Only relevant when y != NULL. If paired = TRUE pairwise comparisons are calculated between elements in x and y (and x and y need to be of the same length). If paired = FALSE then all objects in x are compared to all objects in y.


Whether dissimilarities between pairs of sites should be calculated from differences in cummulative abundance ("cumulative"), in total abundance ("total") or in volumes of cumulative abundance profiles ("volume").


The dissimilarity coefficient to calculate (see details).


A function or the name of a function to be applied to each cumulative abundance value.


A numerical vector or a matrix containing the weight of each size class or combination of size classes (see functions CAP2matrix and CAS2matrix). If NULL, then the function assumes classes of equal weight.


Miquel De Cáceres, CREAF.


The six different coefficients available are described in De Caceres et al. (2013): (1) method="bray" for percentage difference (alias Bray-Curtis dissimilarity); (2) method="ruzicka" for Ruzicka index (a generalization of Jaccard); (3) method="kulczynski" for the Kulczynski dissimilarity index; (4) method="ochiai" for the complement of a quantitative generalization of Ochiai index of similarity; (5) method="canberra" for the Canberra index (Adkins form); (6) method="relman" for the relativized Manhattan coefficient (Whittaker's index of association). Currently, the function also supports (7) method="manhattan" for the city block metric.


De Cáceres, M., Legendre, P. & He, F. (2013) Dissimilarity measurements and the size structure of ecological communities. Methods in Ecology and Evolution 4: 1167-1177.

See Also

stratifyvegdata, vegdist


Run this code
## Load stratified data

## Check that 'medreg' has correct class

## Create cumulative abundance profile (CAP) for each plot
medreg.CAP = CAP(medreg)

## Create dissimilarity (percentage difference) matrix using profiles
medreg.D = vegdiststruct(medreg, method="bray")

## Create dissimilarity (percentage difference) matrix using abundances
medreg.D2 = vegdiststruct(medreg, method="bray", type="total")

## Calculate correlation
cor(as.vector(medreg.D), as.vector(medreg.D2))

Run the code above in your browser using DataCamp Workspace