pca {pcurve} | R Documentation |
Calculates principal components from a matrix
pca(mat, cent = TRUE, scle = FALSE)
mat |
a numeric matrix. |
cent |
a logical value referring to center argument in scale . |
scle |
a logical value referring to scale argument in scale . |
a list containing
pcs |
a matrix of principal component loadings |
d |
a matrix containing the singular value (eigenvalue) of each principal component on its diagonal |
v |
a matrix of eigenvectors |
R port by Chris Walsh Chris.Walsh@sci.monash.edu.au from S+ library by Glenn De'ath g.death@aims.gov.au.
data(soilspec) species <- sqrt(soilspec[,2:9]) specpca <- pca(species) eqscplot(specpca$pcs[,1], specpca$pcs[,2], type = "n", xlab = "Principal component 1", ylab = "Principal component 2") text(specpca$pcs[,1], specpca$pcs[,2], soilspec$site) mtext(paste("Grassland communities in 45 sites"))