R: A function to construct a terms object from a formula.

terms.formula {base} | R Documentation

## A function to construct a terms object from a formula.

### Description

This function takes a formula and some optional arguments and constructs a terms object. The terms object can then be used to construct a `model.matrix`.

### Usage

    terms.formula(x, specials=NULL, abb=NULL, data=NULL, neg.out=TRUE,
                  keep.order=FALSE, ...)

### Arguments

`x` | A formula.
`specials` | What functions in the formula should be marked as special in the terms object.
`abb` | Unused in R.
`data` | A data frame from which the meaning of the special symbol `.` can be inferred. It is unused if there is no `.` in the formula.
`neg.out` | `TRUE` if terms with a minus, `-` should be removed. If FALSE these are kept in and indicate a negative order (for fractionate?).
`keep.order` | A logical value indicating whether the terms should keep their positions. If FALSE the terms are reordered so that main effects come first.
`...` | further arguments passed to or from other methods.

### Details

Not all of the options work in the same way that they do in S and not all are implemented.

### Value

A `terms` object is returned.

### See Also

`terms.object`, `terms.default`

[Package Contents]