varExpl: Variance explained by ordination axes

Description Usage Arguments Value Author(s) See Also Examples

View source: R/varExpl.R

Description

Extracts information about the variance explained by ordination axes and expresses it in a variety of ways.

Usage

1
2
3
4
5
6
7
8
varExpl(object, ...)

## S3 method for class 'cca'
varExpl(object, axes = 1L, cumulative = FALSE,
        pcent = FALSE, ...)

## S3 method for class 'prcurve'
varExpl(object, pcent = FALSE, ...)

Arguments

object

an R object of an appropriate type. Currently only for objects that inherit from classes "cca" or "prcurve".

axes

numeric vector indicating which axes to compute variance explained for.

cumulative

logical; should the variance be explained as a cumulative sum over the axes?

pcent

logical; should the variance explained be expressed as a percentage of the total variance.

...

additional arguments passed to other methods. Currently not used.

Value

A numeric vector variance explained by each axis.

Author(s)

Gavin L. Simpson

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(abernethy)

## Remove the Depth and Age variables
abernethy2 <- abernethy[, -(37:38)]

## Fit PCA
aber.pca <- rda(abernethy2)

## Distance along the first PCA axis
varExpl(aber.pca)

gavinsimpson/analogue documentation built on June 17, 2021, 2:37 a.m.