All functions extract the indicated matrix from the fitted model, and
will work with any object having a suitably named component.
The default scores
and loadings
methods also handle
prcomp
objects (their scores and loadings components are called
x
and rotation
, resp.), and add an attribute
"explvar"
with the variance explained by each component, if
this is available. (See explvar
for details.)