On 14/05/2010 10:14 AM, thmsfuller...@gmail.com wrote:
Hello All,
By default, a reference of a variable in a function cause R to look
for the variable in the parent environment if it is not available in
the current environment (without generating any errors or warnings).
I'm wondering if there i
On May 14, 2010, at 11:33 AM, thmsfuller...@gmail.com wrote:
> On Fri, May 14, 2010 at 10:13 AM, Simon Urbanek
> wrote:
>>
>> On May 14, 2010, at 10:29 AM, Jeff Ryan wrote:
>>
>>> This isn't like a local variable though, since any function above the
>>> baseenv() in the search path will also n
On Fri, May 14, 2010 at 10:13 AM, Simon Urbanek
wrote:
>
> On May 14, 2010, at 10:29 AM, Jeff Ryan wrote:
>
>> This isn't like a local variable though, since any function above the
>> baseenv() in the search path will also not be found.
>>
>
> Yes, but that is a consequence of the request and henc
On May 14, 2010, at 10:29 AM, Jeff Ryan wrote:
> This isn't like a local variable though, since any function above the
> baseenv() in the search path will also not be found.
>
Yes, but that is a consequence of the request and hence intended. You can
always either specify the full path to the f
On Fri, May 14, 2010 at 10:10 AM, Gabor Grothendieck
wrote:
> You can get around that by using this instead:
>
> environment(f) <- as.environment(2)
>
> provided it is done after you have loaded all your packages.
Another approach is to inspect function by function:
library(codetools)
findGlobal
You can get around that by using this instead:
environment(f) <- as.environment(2)
provided it is done after you have loaded all your packages.
On Fri, May 14, 2010 at 10:29 AM, Jeff Ryan wrote:
> This isn't like a local variable though, since any function above the
> baseenv() in the search pa
This isn't like a local variable though, since any function above the
baseenv() in the search path will also not be found.
> f
function(a) { rnorm(b) }
> f()
Error in f() : could not find function "rnorm"
Jeff
On Fri, May 14, 2010 at 9:20 AM, Hadley Wickham wrote:
> > Hello All,
> >
> > By d
> Hello All,
>
> By default, a reference of a variable in a function cause R to look
> for the variable in the parent environment if it is not available in
> the current environment (without generating any errors or warnings).
> I'm wondering if there is a way to revert this behaviors, such that it
Hello All,
By default, a reference of a variable in a function cause R to look
for the variable in the parent environment if it is not available in
the current environment (without generating any errors or warnings).
I'm wondering if there is a way to revert this behaviors, such that it
will not l