pca {pcurve}R Documentation

Principal Component Analysis

Description

Calculates principal components from a matrix

Usage

pca(mat, cent = TRUE, scle = FALSE)

Arguments

mat

a numeric matrix.

cent

a logical value referring to center argument in scale.

scle

a logical value referring to scale argument in scale.

Value

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

Author(s)

R port by Chris Walsh cwalsh@unimelb.edu.au from S+ library by Glenn De'ath g.death@aims.gov.au.

Examples

         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"))

[Package pcurve version 0.6-5 Index]