[R] make an model object (e.g. nlme) available in a user defined function (xyplot related)

Jun Shen jun.shen.ut at gmail.com
Sun Jul 11 23:21:42 CEST 2010


Dear all,

When I construct an nlme model object by calling nlme(...)->mod.nlme,
this object can be used in xyplot(). Something like

xyplot(x,y,......
......
ind.predict<-predict(mod.nlme)
......
) is working fine in console environment.

But the same structure is not working in a user defined function. It
seems the "mod.nlme" created in a user defined function can not be
called in xyplot(). Why is that? Appreciate any comment. (The error
message says " Error in using packet 1, object "model" not found")

Thanks.

Jun Shen



More information about the R-help mailing list