Re: [Rd] Detecting bad lexical scoping

2011-03-17 Thread Gabor Grothendieck
On Wed, Mar 16, 2011 at 4:14 PM, Ryan King wrote: > I've recently hunted down a troublesome bug in my own code, and am > looking for an easy mechanism to detect this kind of error in other R > code.  The problem was an undefined variable inside of a function. > Unfortunately, R looked for that var

Re: [Rd] Detecting bad lexical scoping

2011-03-17 Thread Duncan Murdoch
On 16/03/2011 4:14 PM, Ryan King wrote: I've recently hunted down a troublesome bug in my own code, and am looking for an easy mechanism to detect this kind of error in other R code. The problem was an undefined variable inside of a function. Unfortunately, R looked for that variable in the glob

[Rd] Detecting bad lexical scoping

2011-03-17 Thread Ryan King
I've recently hunted down a troublesome bug in my own code, and am looking for an easy mechanism to detect this kind of error in other R code. The problem was an undefined variable inside of a function. Unfortunately, R looked for that variable in the global environment and found it since there wa