envfit
Envfit is a function in the vegan package for the R programming language used to relate environmental variables to an ordination, such as NMDS, PCA, or RDA. It helps interpret patterns in community composition by identifying which measured environmental factors align with the observed gradient and how strongly they do so. The function can fit both continuous variables and categorical factors, providing a visual and statistical link between the environment and the ordination results.
For continuous environmental variables, envfit fits vectors (arrows) in the ordination space. The length and direction
The output is an envfit object containing results for both vectors and factors, including r2 values and
Usage typically involves providing an ordination object and a data frame or matrix of environmental variables,