[Rd] NLME: gls parameter evaluation inconsistency (PR#4757)

Warnes, Gregory R gregory_r_warnes at groton.pfizer.com
Wed Nov 5 15:55:13 MET 2003

> -----Original Message-----
> From: Douglas Bates [mailto:bates at stat.wisc.edu]
> Sent: Friday, October 24, 2003 12:16 PM
> Yes.  It's the old "standard non-standard evaluation" problem.  The
> model.frame function is (and has to be) very peculiar in the way
> that it determines the value of variable names without local
> bindings.  That's the non-standard evaluation part.  Because it is
> difficult to get this right, it helps if it only needs to be done in
> one place so we have what Thomas Lumley described as a "standard
> non-standard evaluation" function in the current model.frame function.
> However, model.frame expects to have only one argument called
> "formula" (the first argument) containing a formula that will need to
> be evaluated in the frame.  The model fitting functions in the nlme
> package can have formulas in multiple arguments.  Arranging for the
> proper call to model.frame to be evaluated is not easy.
> A workaround is to use subset on the data frame passed as an argument
> prgls <- function(name){ gls( log10(Y)~(cond-1)+(cond-1):t
>  ,subset(pr,subject==name))}

Why don't we extend model.frame to allow for multiple 'formula-like'
arguments?  Perhaps by adding an argument that allows the call to specify
which paramters are 'formula-like'?


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

More information about the R-devel mailing list