Fit an environmental vector or factor to a CoCA ordination
Description
The function fits environmental vectors or factors to a CoCA ordination. The projections of points onto vectors have maximum correlation with corresponding environmental variables, and the factors show the averages of factor levels.
Usage
1 2 3 4 
Arguments
ord 
a CoCA ordination object, the result of a call to

env 
a data frame, matrix or vector of environmental/external variable(s) to be fitted to the ordination. The variables may be of a mixed type (factors and continuous variables) in a data frame. 
which 
character; which of the response or predictor ordinations should be used during fitting of vectors and factors. 
choices 
numeric; the axes to which vectors and factors are fitted. 
scaling 
logical; should sacling be applied. See

w 
weights used in fitting vectors and factors. 
na.rm 
Remove points with missing values in ordination scores or
environmental variables. The operation is casewise; the whole row of
data is removed if there is a missing value and 
strata 
An integer vector or factor specifying the strata for permutation. If supplied, observations are permuted only within the specified strata. 
permutations 
Number of permutations for assessing significance
of vectors or factors. Set to 
... 
Arguments passed to 
Details
See envfit
for details of the method.
Value
Returns an object of class envfit
.
Author(s)
Gavin L. Simpson. The code interfaces with and uses code from
envfit
for the main computations, which was written by
Jari Oksanen.
See Also
coca
for fitting models. envfit
for
details of the generic function and the computations performed.
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  ## symmetric CoCA
data(beetles)
data(plants)
## log transform the bettle data
beetles < log(beetles + 1)
## fit the model
bp.sym < coca(beetles ~ ., data = plants, method = "symmetric")
## load the environmental data
data(verges)
## fit vectors for the environmental data
sol < envfit(bp.sym, verges, which = "response")
sol
## plot the response matrix and the fitted vectors
plot(bp.sym, which = "response")
plot(sol)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.