Skip to contents

model.frame returns a data.frame object for use in lmabc() and similar functions. It reimplements the first few lines of lm() to properly format the formula and data parameters. If only formula is passed, all variables must be vectors in the environment. If formula and data are passed, variables are first pulled from data, then filled from the environment.

Usage

model_frame(formula, data, ...)

Arguments

formula

formula object

data

data.frame object

...

other parameters to fill in the call

Value

a data.frame with the variables in formula