en:pca_r
Section: Ordination analysis
PCA & tb-PCA (linear unconstrained ordination)
R functions
rda(libraryvegan) - if the environmental data matrix in this function is not specified, therdafunction from packageveganperforms unconstrained ordination (PCA). To calculate tb-PCA, first pre-transform the compositional data (usingdecostandfromvegan, with argumentmethodeitherhellingerorchord) and then userdafunction. Functionplotdraws ordination diagram, but species are drawn like centroids, not like vectors (the same in functionordiplot); usebiplot(libraryvegan) to draw variables as vectors, or consider using functioncleanplot.pca(from Numerical Ecology with R, definition here), which is intended for drawing PCA results.prcompandprincomp- functions, which are a part of preinstalled librarystats. Beware:plotfunction does not draw ordination diagram, but draws the barplot with eigenvalues (but you can use functionsordiplotorbiplotfromveganpackage instead).pca(librarylabdsv) - another option, how to calculate pca. The librarylabdsvprovides its ownplot.pcaand other (e.g.points.pca) functions, because the results ofpcafunction are not compatible withordiplotfromvegan.PCA(P. Legendre in Numerical Ecology with R) - custom build function (calledPCA.newrin the second edition), withbiplotfor ploting. You can find the definition here.
applied on the object returned by vegan's function rda.
ordiequilibriumcircle(libraryBiodiversityR) - adds the circle of equivalent contribution onto the ordination diagram plotted byvegan's functionsordiplotorbiplot. Note that the ordination diagram needs to be stored into an object, and the name of this object needs to come in the argumentordiplotof this function.
en/pca_r.txt · Last modified: by David Zelený
