Skip to content
Prev 17199 / 63424 Next

problem using model.frame()

If its just a matter of specifying two data frames how about just
letting the user specify them as the first two arguments without
injecting formulas into it so that any of these are allowed but
data frames are still not allowed in formulas other than in the
data argument:

yourfunction(df1, df2)
yourfunction(y ~ sp1 + sp2)
yourfunction(y ~., df)

This could easily be implemented by having yourfunction be
generic in which case the first one would dispatch
yourfunction.data.frame and the second and third would
dispatch yourfunction.formula .
On 8/17/05, Gavin Simpson <gavin.simpson at ucl.ac.uk> wrote: