Re: [Rd] parent.frame(1) of a S4 method is not a calling environment.

2010-08-16 Thread Martin Morgan
On 08/15/2010 02:39 PM, Vitaly S. wrote: > > Dear Developers, > > I wonder what are the parent.frame rules for methods. For ordinary functions > one > can call parent.frame() and be sure that it is the environment of a calling > function. With S4 aparently it is not the case. > > Here is what I

Re: [Rd] parent.frame(1) of a S4 method is not a calling environment.

2010-08-16 Thread Vitaly S.
Martin Morgan writes: >> >> So, can I be sure that for such functions parent.frame(2) will always work? >> What are the additional rules? > > callNextMethod() will cause additional problems; the idea that you'll > grab things from somewhere other than function arguments doesn't seem > like a ro