## Extracting the ``Environment'' of a Model Formula

## Usage

    model.frame(formula, data, na.action, ...)
    model.frame.default(formula, data=sys.frame(sys.parent()),
                        na.action = na.fail, ...)

## Arguments

`formula` | a model formula
`data` | `data.frame` or `environment` where the objects in formula are.
`na.action` | how `NA`s are treated.
`...` | further arguments such as.......

## Description

`model.frame` is a generic function, and `model.frame.default` its default method.

## Value

A `data.frame` containing the variables used in `formula`.

## See Also

`model.frame.lm` for the method used in `lm`.

## Examples

    data(cars)
    data.class(model.frame(dist ~ speed, data = cars))

[Package Contents]