Skip to content
Prev 1916 / 398506 Next

scoping problem?

On Thu, 21 Jan 1999 yudi at hermes.ucd.ie wrote:

            
In both an old and the current development release you can fix this by
removing the quotes around 'fn', or by using FUN=get("fn",mode="function")

The problem is in outer(), in either the original or the current improved
version. If FUN is a string we use get(FUN,mode="function"), which looks
for FUN in the current environment and all parent environments. The
problem is that "current" here means the environment in outer() or in
match.fun(), not the environment outer() was called from. 

We probably need to fix match.fun() to take an environment parameter and
outer() to then use match.fun(FUN,env=sys.frame(sys.parent()))


Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle.





-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._