envfit.coca {cocorresp}  R Documentation 
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.
## S3 method for class 'coca' envfit(ord, env, which = c("response", "predictor"), choices = c(1, 2), scaling = FALSE, w, na.rm = FALSE, strata = NULL, permutations = 999, ...)
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 
... 
See envfit
for details of the method.
Returns an object of class envfit
.
Gavin L. Simpson. The code interfaces with and uses code from
envfit
for the main computations, which was written by
Jari Oksanen.
coca
for fitting models. envfit
for
details of the generic function and the computations performed.
## 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 biplot(bp.sym, which = "y1") plot(sol)