Learn R Programming

analogue (version 0.17-7)

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

# S3 method for default gradientDist(object, na.rm = TRUE, ...)

# S3 method for cca gradientDist(object, na.rm = TRUE, axis = 1L, scaling = 0, ...)

# S3 method for prcurve gradientDist(object, na.rm = TRUE, ...)

Value

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

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.

Author

Gavin L. Simpson

See Also

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

Examples

Run this code

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)

Run the code above in your browser using DataLab