## S3 method for class 'default':
scores(x, display=c("sites", "species"), choices, ...)sites or
    species.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 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 for
  other cases, or fail mysteriously.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.data(varespec)
library(mva)
vare.pca <- prcomp(varespec)
scores(vare.pca, choices=c(1,2))Run the code above in your browser using DataLab