Peter Dalgaard wrote:
Ales Ziberna <[EMAIL PROTECTED]> writes:
I am also very interested how this could be done, possibly in such a
way that this would be incorporated in the function itself and there
wouldn't be a need to write "environment(f) <- NULL" before calling a
function, as is proposed in
Ales Ziberna <[EMAIL PROTECTED]> writes:
> I am also very interested how this could be done, possibly in such a
> way that this would be incorporated in the function itself and there
> wouldn't be a need to write "environment(f) <- NULL" before calling a
> function, as is proposed in the reply bel
-
> From: "Gabor Grothendieck" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: "Submissions to R help"
> Sent: Friday, April 15, 2005 5:05 PM
> Subject: Re: [R] Define "local" function
>
> > On 4/15/05, Fernando Saldanha <[EMA
s ago!
Thanks for any suggestions,
Ales Ziberna
- Original Message -
From: "Gabor Grothendieck" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Submissions to R help"
Sent: Friday, April 15, 2005 5:05 PM
Subject: Re: [R] Define "local" function
On 4/15/05, Fernando Saldanha <[EMAIL PROTECTED]> wrote:
> I discovered a bug in a program I am writing which was due to the
> program using a global variable within a function.
>
> For example,
>
> myfunc <- function(x) { y}
>
> That is, I made a mistake when defining the function and wrote "y"
This came up just a few days ago on the mailing list! Check the
archives here:
https://stat.ethz.ch/pipermail/r-help/2005-April/067639.html
-roger
Fernando Saldanha wrote:
I discovered a bug in a program I am writing which was due to the
program using a global variable within a function.
For exa
I discovered a bug in a program I am writing which was due to the
program using a global variable within a function.
For example,
myfunc <- function(x) { y}
That is, I made a mistake when defining the function and wrote "y"
when I should have written "x".
However, there was a variable y in the