Define or Extract a Model Formula - Generic Function

DESCRIPTION:

Returns a formula object.

This function is an S Version 3 generic (see Methods); method functions can be written to handle specific S Version 3 classes of data. Classes that already have methods for this function include data.frame, bdFrame, formula, lm, bdLm, and terms.

USAGE:

formula(object) 
as.formula(object) 

REQUIRED ARGUMENTS:

object
either a formula expression (a call to the ~ operator), or an object that defines such an expression, such as a fitted model or a terms object.

VALUE:

an object of class "formula", essentially just the call to ~. The as.formula function differs only in that it will preserve the full class attribute of an object that inherits from class "formula".

SEE ALSO:

For a quick description of formula syntax see . For more information see the S-PLUS Guide to Statistics chapter "Specifying Models in S-PLUS".

EXAMPLES:

sqrt(skips) ~ . #or, equivalently 
formula(sqrt(skips) ~ .) 
formula(fuel.fit) # find the formula