Description Usage Arguments Details Value Note Author(s) References See Also Examples
You can define your own dissimilarities using terms for shared and total quantities, number of rows and number of columns. The shared and total quantities can be binary, quadratic or minimum terms. In binary terms, the shared component is number of shared species, and totals are numbers of species on sites. The quadratic terms are crossproducts and sums of squares, and minimum terms are sums of parallel minima and row totals.
1 2 3  designdist(x, method = "(A+B2*J)/(A+B)",
terms = c("binary", "quadratic", "minimum"),
abcd = FALSE, name)

x 
Input data. 
method 
Equation for your dissimilarities. This can use terms

terms 
How shared and total components are found. For vectors

abcd 
Use 2x2 contingency table notation for binary data: a is the number of shared species, b and c are the numbers of species occurring only one of the sites but not in both, and d is the number of species that occur on neither of the sites. 
name 
The name you want to use for your index. The default is to
combine the 
Most popular dissimilarity measures in ecology can be expressed with
the help of terms J
, A
and B
, and some also involve
matrix dimensions N
and P
. Some examples you can define in
designdist
are:
A+B2*J  "quadratic"  squared Euclidean 
A+B2*J  "minimum"  Manhattan 
(A+B2*J)/(A+B)  "minimum"  BrayCurtis 
(A+B2*J)/(A+B)  "binary"  Sørensen 
(A+B2*J)/(A+BJ)  "binary"  Jaccard 
(A+B2*J)/(A+BJ)  "minimum"  Ružička 
(A+B2*J)/(A+BJ)  "quadratic"  (dis)similarity ratio 
1J/sqrt(A*B)  "binary"  Ochiai 
1J/sqrt(A*B)  "quadratic"  cosine complement 
1phyper(J1, A, PA, B)  "binary"  RaupCrick (but see raupcrick )

The function designdist
can implement most dissimilarity
indices in vegdist
or elsewhere, and it can also be
used to implement many other indices, amongst them, most of those
described in Legendre & Legendre (2012). It can also be used to
implement all indices of beta diversity described in Koleff et
al. (2003), but there also is a specific function
betadiver
for the purpose.
If you want to implement binary dissimilarities based on the 2x2
contingency table notation, you can set abcd = TRUE
. In this
notation a = J
, b = AJ
, c = BJ
, d = PAB+J
.
This notation is often used instead of the more more
tangible default notation for reasons that are opaque to me.
designdist
returns an object of class dist
.
designdist
does not use compiled code, and may be slow or use
plenty of memory in large data sets. It is very easy to make errors
when defining a function by hand. If an index is available in a
function using compiled code, it is better to use the canned
alternative.
Jari Oksanen
Koleff, P., Gaston, K.J. and Lennon, J.J. (2003) Measuring beta diversity for presence–absence data. J. Animal Ecol. 72, 367–382.
Legendre, P. and Legendre, L. (2012) Numerical Ecology. 3rd English ed. Elsevier
1 2 3 4 5 6 7 8 9 10 11 12  ## Arrhenius dissimilarity: the value of z in the speciesarea model
## S = c*A^z when combining two sites of equal areas, where S is the
## number of species, A is the area, and c and z are model parameters.
## The A below is not the area (which cancels out), but number of
## species in one of the sites, as defined in designdist().
data(BCI)
dis < designdist(BCI, "(log(A+BJ)log(A+B)+log(2))/log(2)")
## This can be used in clustering or ordination...
ordiplot(cmdscale(dis))
## ... or in analysing beta diversity (without gradients)
summary(dis)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.