pca                  package:pcurve                  R Documentation

_P_r_i_n_c_i_p_a_l _C_o_m_p_o_n_e_n_t _A_n_a_l_y_s_i_s

_D_e_s_c_r_i_p_t_i_o_n:

     Calculates principal components from a matrix

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

     mat: a numeric matrix.

    cent: a logical value referring to center argument in 'scale'.

    scle: a logical value referring to scale argument in 'scale'.

_V_a_l_u_e:

     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

_A_u_t_h_o_r(_s):

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

_E_x_a_m_p_l_e_s:

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

