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

Deepayan Sarkar deepayan.sarkar at gmail.com
Mon Jul 12 08:05:58 CEST 2010


On Mon, Jul 12, 2010 at 2:51 AM, Jun Shen <jun.shen.ut at gmail.com> wrote:
> 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")

Quoting from the footer:

 PLEASE [...] provide commented, minimal, self-contained, reproducible code.

-Deepayan


> Thanks.
>
> Jun Shen
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list