gradientDist {analogue}R Documentation

Positions of samples along a unit-length ordination gradient.

Description

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.

Usage

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, ...)

Arguments

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 scores.cca for details.

...

additional arguments passed to other methods. In the "cca" method, these are also passed to scores.cca.

Value

A numeric vector of positions along the gradient, scaled to the range 0, ..., 1.

Author(s)

Gavin L. Simpson

See Also

See cca and prcurve for functions that produce objects that gradientDist() can work with.

Examples


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)

[Package analogue version 0.17-6 Index]