gradientDist | R Documentation |
Extracts information as to the locations of samples along an
ordination gradient. gradientDist()
standardises the entire
gradient to the interval 0, ..., 1, to allow comparison between
methods or data sets.
gradientDist(object, ...)
## Default S3 method:
gradientDist(object, na.rm = TRUE, ...)
## S3 method for class 'cca'
gradientDist(object, na.rm = TRUE, axis = 1L,
scaling = 0, ...)
## S3 method for class 'prcurve'
gradientDist(object, na.rm = TRUE, ...)
object |
an R object of an appropriate type. For the default method, any R object that can be coerced to a vector. |
na.rm |
logical; should missing values be removed? |
axis |
numeric, length 1; the ordination axis to take as the gradient. |
scaling |
Scaling to apply to the site scores. Default is to do
no scaling. See |
... |
additional arguments passed to other methods. In the
|
A numeric vector of positions along the gradient, scaled to the range 0, ..., 1.
Gavin L. Simpson
See cca
and prcurve
for functions that
produce objects that gradientDist()
can work with.
data(abernethy)
## Remove the Depth and Age variables
abernethy2 <- abernethy[, -(37:38)]
## Fit PCA
aber.pca <- rda(abernethy2)
## Distance along the first PCA axis
gradientDist(aber.pca)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.