require(vegan)
data(iris)
PCA <- rda(iris[,1:4])
MVA.plot(PCA,fac=iris$Species,col=1:3)
# Global test
envfit(PCA~Species,data=iris)
# Pairwise comparisons
# (not enough permutations here but faster to run)
pairwise.factorfit(PCA,iris$Species,nperm=49)
Run the code above in your browser using DataLab