> > 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 comportement of a function.
Of course, mean is an argument of an other function, but I do not think 
this is a reason good enouth to say that mean is a variable.

Furthemore, I use findGlobals to detect some typo. In

f <- function(myObject){return(mObject^2)}

findGlobals will detect that mObject is a global so I know there is a 
typo somewhere.
Considering mean as a globals do not let us use findGlobals this way.

Christophe

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to