Hello R People: Suppose I create a function, x.e, via the fix command:> x.e <- fix(x.e)When I type in x.e, the function code appears, along with the name/number of the environment. However, if I create a function, y.e, and source it in, when I type in y.e, the function code only displays(no environment). Why is this, please? (It's not a bug....I just wondered). I am using R-1.1.0 for Windows. Thanks! Sincerely, Erin M. Hodgess, Ph.D. Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown One Main Street Houston, TX 77002 e-mail: hodgess at uhddx01.dt.uh.edu -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Martin Maechler
2000-Jul-12 06:33 UTC
[R] buglet in fix() [was "function via source or fix"]
>>>>> "Erin" == Erin Hodgess <hodgess at uhddx01.dt.uh.edu> writes:Erin> Suppose I create a function, x.e, via the fix command: (ESS users ESS don't ever do this, but still ...) >> x.e <- fix(x.e) Erin> When I type in x.e, the function code appears, along Erin> with the name/number of the environment. Ok, in the above it was important that there's no *existing* object x.e beforehand. Note that the idea about fix() is that you only have to write fix(x.e) But your problem remains : > fix(newerf) Waiting for Emacs...Done --- I have options(editor = "emacsclient") > newerf function () { ## newer } <environment: 0x40862004> > environment(newerf) <environment: 0x40862004> > ls(env=environment(newerf)) [1] "subx" "x" > I.e. it got the environment of the function fix -- I think this is clearly a bug CC'ed to R-bugs Erin> However, if I create a function, y.e, and source it in, when Erin> I type in y.e, the function code only displays(no Erin> environment). Erin> Why is this, please? (It's not a bug....I just wondered). it *is* a bug, I think Erin> I am using R-1.1.0 for Windows. same for Unix Erin> Thanks! thank you for the report! Martin Maechler <maechler at stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO D10 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <>< -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._