Re: [Rd] sys.function(0)

2016-03-27 Thread Mick Jordan
On 3/27/16 2:46 PM, peter dalgaard wrote: On 27 Mar 2016, at 22:05 , Mick Jordan wrote: As I understand https://stat.ethz.ch/R-manual/R-devel/library/base/html/sys.parent.html sys.function(n) returns the function associated with stack frame n. Since frame 0 is defined as .GlobalEnv which is not

Re: [Rd] sys.function(0)

2016-03-27 Thread peter dalgaard
> On 27 Mar 2016, at 22:05 , Mick Jordan wrote: > > As I understand > https://stat.ethz.ch/R-manual/R-devel/library/base/html/sys.parent.html > sys.function(n) returns the function associated with stack frame n. > Since frame 0 is defined as .GlobalEnv which is not associated with a > functio

[Rd] sys.function(0)

2016-03-27 Thread Mick Jordan
As I understand https://stat.ethz.ch/R-manual/R-devel/library/base/html/sys.parent.html sys.function(n) returns the function associated with stack frame n. Since frame 0 is defined as .GlobalEnv which is not associated with a function, I would expect this to always return NULL. However, it does