loadings {cocorresp} | R Documentation |
Extract CoCA species loadings from fitted objects.
loadings(x, ...)
## S3 method for class 'predcoca'
loadings(x, choices = c(1, 2),
which = c("response", "predictor"), ...)
## S3 method for class 'symcoca'
loadings(x, choices = c(1, 2),
which = c("y1", "y2"), ...)
x |
an object resulting from a call to |
choices |
numeric; vector of Co-CA axes to extract loadings for. |
which |
character; should the response or predictor scores be
plotted. Can be specified in several ways: response choices
are one from |
... |
additional arguments to be passed to lower level methods. |
loadings()
is an extractor function to access the loadings of a
fitted CoCA model.
This is a generic function, replacing the
loadings
function, which is preserved as the
exported default S3 method. Methods are provided for both predictive
and symmetric CoCA.
A list of data frames or a single data frame depending on other arguments.
Gavin L. Simpson
coca
for how to fit CoCA models.
## symmetric CoCA
data(beetles)
## log transform the bettle data
beetles <- log(beetles + 1)
data(plants)
## fit the model
bp.sym <- coca(beetles ~ ., data = plants, method = "symmetric")
## extract the loadings
lds <- loadings(bp.sym)