[R] findGlobals on apply

Duncan Murdoch murdoch at stats.uwo.ca
Tue Apr 8 00:48:18 CEST 2008


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 global variable, so findGlobals gets it right.  The 
"functions" and "variables" lists describe how they are used, not what 
is bound to that name.

Duncan Murdoch



More information about the R-help mailing list