Computes the rank correlation between distances between sites in terms of gradient variables, such as environmental ones, and species composition.
rankDC(g, y, dc = c("chord", "bray", "euclidean", "chi.square", "gower"),
method = "spearman")# S3 method for rankDC
plot(x, sort = TRUE, decreasing = FALSE,
xlab = "Rank correlation", color = "blue",
pch = 21, bg = "blue", lcolor = "grey",
lty = "solid", ...)
# S3 method for rankDC
dotplot(x, data = NULL, sort = TRUE, decreasing = FALSE,
xlab = "Rank correlation", ...)
A named vector of rank correlations is returned.
the gradient values; usually a data frame of environmental data.
the species data; usually a data frame.
character; the set of dissimilarity coefficients for which rank correlations with gradient distance are to be computed.
character; the correlation method to use. See the
method
argument of cor
.
an object of class "rankDC"
.
NULL; ignored, only present for purposes of conformance to generic definition.
logical; should observations be sorted prior to plotting? If so, should they be sorted in order of decreasing size?
The x-axis label for the plot.
arguments passed to
dotchart
.
arguments passed to other methods, including
dotchart
and dotplot
.
Gavin L. Simpson, based on rankindex
from the
vegan package.
rankindex
from package vegan. For the
dotplot
method, see dotplot
.
data(swappH)
data(swapdiat)
rc <- rankDC(swappH, swapdiat, dc = c("chord","euclidean","gower"))
## base plot uses dotchart()
plot(rc)
## lattice version of the base plot
dotplot(rc)
Run the code above in your browser using DataLab