The way nls looks for variables in its formula is very unusual. For
non-parameters it has
for(var in varNames[!varIndex])
mf[[var]] <- eval(as.name(var), data)
inside nls, and that means that the scoping rules are first 'data' then
the body of nls(). That's surely not what one wo
Short story: January 2006 I did some analysis in R-2.2.1 using nls. Repeating
the exercise in R-2.3.1 yesterday produced somewhat different results.
After some debugging I found that either nls is the problem or that mine
understanding of environments or scoping rules is lacking something.
T