#Hellinger transformation of mite data and PCA mite.spe.hel <- decostand(mite.spe, method="hellinger") mite.spe.h.pca <- rda(mite.spe.hel) #What are the significant axes? ev <- mite.spe.h.pca$CA$eig ev[ev>mean(ev)] n <- length(ev) barplot(ev, main="Eigenvalues", col="grey", las=2) abline(h=mean(ev), col="red") legend("topright", "Average eigenvalue", lwd=1, col=2, bty="n") #Output summary/results summary(mite.spe.h.pca, display=NULL) windows() #Plot the biplot plot(mite.spe.h.pca, scaling=1, type="none", xlab=c("PC1 (%)", round((mite.spe.h.pca$CA$eig[1]/sum(mite.spe.h.pca$CA$eig))*100,2)), ylab=c("PC2 (%)", round((mite.spe.h.pca$CA$eig[2]/sum(mite.spe.h.pca$CA$eig))*100,2))) points(scores(mite.spe.h.pca, display="sites", choices=c(1,2), scaling=1), pch=21, col="black", bg="steelblue", cex=1.2) text(scores(mite.spe.h.pca, display="species", choices=c(1), scaling=1), scores(mite.spe.h.pca, display="species", choices=c(2), scaling=1), labels=rownames(scores(mite.spe.h.pca, display="species", scaling=1)), col="red", cex=0.8)