Learn R Programming

analogue (version 0.14-0)

rankDC: Rank correlation between environmental and species dissimilarities.

Description

Computes the rank correlation between distances between sites in terms of gradient variables, such as environmental ones, and species composition.

Usage

rankDC(g, y, dc = c("chord", "bray", "euclidean", "chi.square", "gower"),
       method = "spearman")

## S3 method for class 'rankDC': plot(x, sort = TRUE, decreasing = FALSE, xlab = "Rank correlation", color = "blue", pch = 21, bg = "blue", lcolor = "grey", lty = "solid", \dots)

## S3 method for class 'rankDC': dotplot(x, data = NULL, sort = TRUE, decreasing = FALSE, xlab = "Rank correlation", \dots)

Arguments

g
the gradient values; usually a data frame of environmental data.
y
the species data; usually a data frame.
dc
character; the set of dissimilarity coefficients for which rank correlations with gradient distance are to be computed.
method
character; the correlation method to use. See the method argument of cor.
x
an object of class "rankDC".
data
NULL; ignored, only present for purposes of conformance to generic definition.
sort, decreasing
logical; should observations be sorted prior to plotting? If so, should they be sorted in order of decreasing size?
xlab
The x-axis label for the plot.
color, pch, bg, lcolor, lty
arguments passed to dotchart.
...
arguments passed to other methods, including dotchart and dotplot.

Value

  • A named vector of rank correlations is returned.

See Also

rankindex from package vegan. For the dotplot method, see dotplot.

Examples

Run this code
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