Calculates the Pearson product-moment correlation coefficient for the site scores of ordination axes.

corAxis(x, ...)

# S3 method for default
corAxis(x, ...)

# S3 method for symcoca
corAxis(x, axes = NULL, ...)

Arguments

x

an ordination object. Only methods for objects of class symcoca are currently available.

axes

numeric; the number of axes to calculate the correlation coefficients for. If NULL, coefficients for all axes are returned.

...

arguments to be passed on to other methods.

Value

A named vector containing the correlation coefficients for the requested axes.

Author

Gavin L. Simpson

Note

The arguments for cor are hard coded at their defaults, see cor for details. A more flexible version is planned that will allow arguments to be passed to cor.

See also

cor, for the main analysis function.

Examples

od <- options(digits = 4)
## load some data
data(beetles)
data(plants)

## log transform the beetle data
beetles <- log(beetles + 1)

## symmetric Co-CA model
beetles.sym <- coca(beetles ~ ., data = plants, method = "symmetric")
#> 
#> Removed some species that contained no data in: beetles, plants 

## correlations between axes
corAxis(beetles.sym)
#>  COCA 1  COCA 2  COCA 3  COCA 4  COCA 5  COCA 6  COCA 7  COCA 8  COCA 9 COCA 10 
#>  0.8795  0.8830  0.8154  0.8490  0.8880  0.7738  0.7264  0.8193  0.7979  0.7758 
#> COCA 11 COCA 12 COCA 13 COCA 14 COCA 15 COCA 16 COCA 17 COCA 18 COCA 19 COCA 20 
#>  0.8908  0.8277  0.8916  0.9240  0.7915  0.7046  0.6205  0.7882  0.7451  0.7148 
#> COCA 21 COCA 22 COCA 23 COCA 24 COCA 25 COCA 26 COCA 27 COCA 28 COCA 29 
#>  0.9076  0.3968  0.8034  0.6177  0.7608  0.9179  0.5622  0.3823  0.9937 
options(od)