rankindex(grad, veg, indices = c("euc", "man", "gow", "bra", "kul"),
stepacross = FALSE, method = "spearman",
metric = c("euclidean", "mahalanobis", "manhattan", "gower"),
...)
vegdist
.
Alternatively, it can be a (named) list of functions returning
objects of class 'dist'.stepacross
to find
a shorter path dissimilarity. The dissimilarities for site pairs
with no shared species are set NA
using
no.shared<
stepacross
.vegdist
against gradient
separation using rank correlation coefficients in
cor
. The gradient separation between each point is
assessed using given metric
. The default is to use Euclidean
distance of continuous variables scaled to unit variance, or to use
Gower metric for mixed data using function
daisy
when grad
has factors. The other
alternatives are Mahalanabis distances which are based on
grad
matrix scaled so that columns are orthogonal
(uncorrelated) and have unit variance, or Manhattan distances of
grad
variables scaled to unit range. The indices
argument can accept any dissimilarity
indices besides the ones calculated by the
vegdist
function. For this, the argument value
should be a (possibly named) list of functions.
Each function must return a valid 'dist' object with dissimilarities,
similarities are not accepted and should be converted into dissimilarities
beforehand.
vegdist
, stepacross
,
no.shared
, monoMDS
,
cor
, Machine
, and for
alternatives anosim
, mantel
and
protest
.data(varespec)
data(varechem)
## The variables are automatically scaled
rankindex(varechem, varespec)
rankindex(varechem, wisconsin(varespec))
## Using non vegdist indices as functions
funs <- list(Manhattan=function(x) dist(x, "manhattan"),
Gower=function(x) cluster:::daisy(x, "gower"),
Ochiai=function(x) designdist(x, "1-J/sqrt(A*B)"))
rankindex(scale(varechem), varespec, funs)
Run the code above in your browser using DataLab