Last data update: 2014.03.03

R: Reconstruct Model Frame and Model Matrices of Constrained...
model.matrix.ccaR Documentation

Reconstruct Model Frame and Model Matrices of Constrained Ordination

Description

Function model.frame.cca reconstructs a data.frame with the variables used in the constrained ordination method (cca, rda or capscale. Function model.matrix.cca creates a list of design matrices used in constrained ordination. The items of the list are called Conditions and Constraints. If either partial (Conditions) or constrained component was missing, a single matrix is returned.

Usage

## S3 method for class 'cca'
model.frame(formula, ...)
## S3 method for class 'cca'
model.matrix(object, ...)

Arguments

formula, object

A constrained ordination result object from which the needed information is extracted.

...

Other arguments passed to the default method of the function.

Details

The constrained ordination method objects do not save data on model frame or design matrix, and the functions must reconstruct the information in the session. This will fail if the data sets and variables of the original model are unavailable.

Value

Returns a data frame (model.frame) or an unnamed matrix or a list of two matrices called Constraints and Conditions (model.matrix).

Author(s)

Jari Oksanen

See Also

model.frame, model.matrix.

Examples

data(dune)
data(dune.env)
mod <- cca(dune ~  poly(A1, 2) + Management + Use, dune.env)
model.frame(mod)
model.matrix(mod)

Results