scores                 package:vegan                 R Documentation

_G_e_t _S_p_e_c_i_e_s _o_r _S_i_t_e _S_c_o_r_e_s _f_r_o_m _a_n _O_r_d_i_n_a_t_i_o_n

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

     Function to access either species or site scores for specified
     axes in some ordination methods.

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

     ## Default S3 method:
     scores(x, display=c("sites", "species"), choices, ...)

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

       x: An ordination result. 

 display: Partial match to access scores for 'sites' or 'species'.  

 choices: Ordination axes.  If missing, returns all axes.

     ...: Other parameters (unused). 

_D_e_t_a_i_l_s:

     Functions 'cca' and 'decorana' have specific 'scores' function to
     access their ordination scores.  Most standard ordination methods
     of libraries 'mva', 'multiv' and 'MASS' do not have a 
     specific'class', and no specific method can be written for them. 
     However, 'scores.default' guesses where some commonly used
     functions keep their site scores and possible species scores.  For
     site scores, the function seeks items in order 'points', 'rproj',
     'x', and 'scores'.  For species, the seeking order is 'cproj',
     'rotation', and 'loadings'. If 'x' is a matrix, 'scores.default'
     returns the chosen columns of that matrix, ignoring whether
     species or sites were requested (do not regard this as a bug but
     as a feature, please). Currently the function seems to work at
     least for 'isoMDS', 'prcomp', 'princomp', 'ca', 'pca'.  It may
     work in other cases or fail mysteriously.

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

     The function returns a matrix of requested scores.

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

     Jari Oksanen

_S_e_e _A_l_s_o:

     'scores.cca', 'scores.decorana'.  These have somewhat different
     interface - 'scores.cca' in particular - but all work with
     keywords 'display="sites"' and 'display="species"' and return a
     matrix with these.

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

     data(varespec)
     vare.pca <- prcomp(varespec)
     scores(vare.pca, choices=c(1,2))

