Re: [R] findGlobals on apply

2008-04-08 Thread Luke Tierney
On Wed, 9 Apr 2008, Christophe Genolini wrote: Hi Luke Thanks for all these explanation, things are clearer. Let me go back on my initial problem, that was, as a programmer, I would like to have a tool to detect typo by detecting globals variables: I get that findGlobals is not design for th

Re: [R] findGlobals on apply

2008-04-08 Thread Christophe Genolini
Hi Luke Thanks for all these explanation, things are clearer. Let me go back on my initial problem, that was, as a programmer, I would like to have a tool to detect typo by detecting globals variables: I get that findGlobals is not design for that. I did not realy understand the use of checkUsa

Re: [R] findGlobals on apply

2008-04-08 Thread Gabor Grothendieck
Yes, based on that it seems understandable although initially suprising. On Tue, Apr 8, 2008 at 12:56 PM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 4/8/2008 7:42 AM, Gabor Grothendieck wrote: > > I think what he is referring to is that findGlobals lists mean under > > variables rather than fu

Re: [R] findGlobals on apply

2008-04-08 Thread Duncan Murdoch
On 4/8/2008 7:42 AM, Gabor Grothendieck wrote: > I think what he is referring to is that findGlobals lists mean under > variables rather than functions when you do this with his f: > >> findGlobals(f, FALSE) > $functions > [1] "{" "apply" > > $variables > [1] "mean" Yes, I understood that, a

Re: [R] findGlobals on apply

2008-04-08 Thread Luke Tierney
On Tue, 8 Apr 2008, Christophe Genolini wrote: f <- function(x){apply(x,2,mean)} findGlobals(f) mean is a global variable, so findGlobals gets it right. That sound strange to me: a "variable" is something that vary... mean does not vary. maen will ge an argument that is a line of x and will

Re: [R] findGlobals on apply

2008-04-08 Thread Gabor Grothendieck
I think what he is referring to is that findGlobals lists mean under variables rather than functions when you do this with his f: > findGlobals(f, FALSE) $functions [1] "{" "apply" $variables [1] "mean" On Tue, Apr 8, 2008 at 7:14 AM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > Christophe Ge

Re: [R] findGlobals on apply

2008-04-08 Thread Duncan Murdoch
Christophe Genolini wrote: >>> f <- function(x){apply(x,2,mean)} >>> findGlobals(f) >>> >> mean is a global variable, so findGlobals gets it right. >> > That sound strange to me: a "variable" is something that vary... mean > does not vary. maen will ge an argument that is a line of x

Re: [R] findGlobals on apply

2008-04-07 Thread Christophe Genolini
> > f <- function(x){apply(x,2,mean)} > > findGlobals(f) > mean is a global variable, so findGlobals gets it right. That sound strange to me: a "variable" is something that vary... mean does not vary. maen will ge an argument that is a line of x and will make some calculous on it, that is the c

Re: [R] findGlobals on apply

2008-04-07 Thread Duncan Murdoch
On 07/04/2008 6:24 PM, Christophe Genolini wrote: > Hi the list, > > Considere the following: > > f <- function(x){apply(x,2,mean)} > findGlobals(f) > > findGlobals consideres mean as a global variable, which it is not. > Is there a way to tell to findGlobals that mean is a function ? mean is a

[R] findGlobals on apply

2008-04-07 Thread Christophe Genolini
Hi the list, Considere the following: f <- function(x){apply(x,2,mean)} findGlobals(f) findGlobals consideres mean as a global variable, which it is not. Is there a way to tell to findGlobals that mean is a function ? Thanks Christophe __ R-help@r-p