R-alpha: Environment strangeness

Peter Dalgaard BSA p.dalgaard@kubism.ku.dk
27 Jul 1997 20:07:06 +0200


Maybe I'm just not understanding things well enough (actually, that's
why I was fooling around with this in the first place), but:

> g
function () 
{
        e <- sys.frame(sys.parent())
        print(ls(envir = e))
        eval(print(b), e)
}
> f
function () 
{
        b <- 7913
        g()
}
> f()
[1] "b"
Error: Object "b" not found

Er? Is "b" in environment "e" or not?

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel 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-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-