Rev 26204 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{terms.formula}\alias{terms.formula}\title{Construct a terms Object from a Formula}\description{This function takes a formula and some optional arguments andconstructs a terms object. The terms object can then be used toconstruct a \code{\link{model.matrix}}.}\usage{\method{terms}{formula}(x, specials = NULL, abb = NULL, data = NULL, neg.out = TRUE,keep.order = FALSE, simplify = FALSE, ...)}\arguments{\item{x}{a formula.}\item{specials}{which functions in the formula should be marked asspecial in the \code{terms} object.}\item{abb}{Not implemented in \R.}\item{data}{a data frame from which the meaning of the special symbol\code{.} can be inferred. It is unused if there is no \code{.} inthe formula.}\item{neg.out}{Not implemented in \R.}\item{keep.order}{a logical value indicating whether the terms shouldkeep their positions. If \code{FALSE} the terms are reordered sothat main effects come first, followed by the interactions,all second-order, all third-order and so on. Effects of a givenorder are kept in the order specified.}\item{simplify}{should the formula be expanded and simplified, thepre-1.7.0 behaviour?}\item{\dots}{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 notall are implemented.}\value{A \code{\link{terms.object}} object is returned. The object itself isthe re-ordered (unless \code{keep.order = TRUE}) formula. In allcases variables within an interaction term in the formula arere-ordered by the ordering of the \code{"variables"} attribute, whichis the order in which the variables occur in the formula.}\seealso{\code{\link{terms}}, \code{\link{terms.object}}}\keyword{models}