R: Model Terms (original) (raw)

terms {stats} R Documentation

Description

The function terms is a generic function which can be used to extract terms objects from various kinds of R data objects.

Usage

terms(x, ...)

Arguments

x object used to select a method to dispatch.
... further arguments passed to or from other methods.

Details

There are methods for classes "aovlist", "terms", and"formula" (see [terms.formula](../../stats/help/terms.formula.html)): the default method just extracts the terms component of the object, or failing that a "terms" attribute (as used by[model.frame](../../stats/help/model.frame.html)).

There are [print](../../base/html/print.html) and [labels](../../base/html/labels.html) methods for class "terms": the latter extracts the term labels (see?[terms.object](../../stats/help/terms.object.html)).

Value

An object of class c("terms", "formula") which contains the_terms_ representation of a symbolic model. See?[terms.object](../../stats/help/terms.object.html) for its structure.

References

⁠Chambers JM, Hastie TJ (1992). “Statistical Models.” In Chambers JM, Hastie TJ (eds.), Statistical Models in S, chapter 2. Wadsworth & Brooks/Cole.

See Also

[terms.object](../../stats/help/terms.object.html), [terms.formula](../../stats/help/terms.formula.html),[lm](../../stats/help/lm.html), [glm](../../stats/help/glm.html), [formula](../../stats/help/formula.html).


[Package _stats_ version 4.6.0 Index]