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

wb at arb-phys.uni-dortmund.de wb at arb-phys.uni-dortmund.de
Fri Oct 24 14:52:28 MEST 2003

Full_Name: W.B.Kloke
Version: 1.8.0
OS: FreeBSD-4.7
Submission from: (NULL) (

I found a parameter evaluation inconsistency in NLME package. I tried to use
gls() inside a function, and I wanted use gls() for different subsets of a data

prgls <- function(name){ gls( log10(Y)~(cond-1)+(cond-1):t

Applying this function with a string as parameter like prgls("VM") yields an
Error in eval(expr, envir, enclos) : Object "name" not found

The same definition with lm() instead of gls() works fine. Of course I want to
use the correlation features of gls(). It looks like a wrong environment at the
place of subset evaluation (the local variables and function paramaters are not
available). Probably lme(), ngls() and nlme() have the same inconsistency.

More information about the R-devel mailing list