R: Description of Terms Objects

terms.object {base} | R Documentation

## Description of Terms Objects

### Description

An object of class `terms` holds information about a model. Usually the model was specified in terms of a `formula` and that formula was used to determine the terms object.

The object itself is simply the formula supplied to the call of `terms.formula`. The object has a number of attributes and they are used to construct the model frame.

### Value

An object with the following attributes:

`factors` | A matrix of variables by terms showing which variables appear in which terms.
`term.labels` | A character vector containing the labels for each of the terms in the model.
`variables` | A list of the variables in the model
`intercept` | Either 0, indicating no intercept is to be fit, or 1 indicating that an intercept is to be fit.
`order` | A vector of the same length as `term.labels` indicating the order of interaction for each term
`response` |
`offset` | If the model contains `offset` terms there is an `offset` attribute indicating which terms are offsets
`specials` | If the `specials` argument was given to `terms.formula` there is a `specials` attribute, a list of vectors indicating the terms that contain these special functions.

The object has class `c("terms", "formula")`.

### Note

These objects are different from those found in S. In particular there is no `formula` attribute, instead the object is itself a formula. Thus, the mode of a terms object is different as well.

An example of the `specials` argument can be seen in the `aov` function.

### See Also

`terms`, `terms.default`, `formula`.

[Package Contents]