mark.bravington@csiro.au
2002-May-15 06:30 UTC
[Rd] lib.fixup, .GlobalEnv, and R1.5.0 (PR#1556)
Full_Name: Mark Bravington Version: 1.5.0 OS: Windows 2000 Submission from: (NULL) (140.79.2.3) In R1.3.1, I used the following code inside a function to set a "path" attribute to .GlobalEnv: env_ pos.to.env( 1) attr( env, 'path')_ .Path # .Path is a named char vector of length 1 .Internal( lib.fixup( env, .GlobalEnv)) # adds the attribute And this works fine. But in R1.5.0, the same code (executed e.g. within a call to "local" from the command line) removes all the objects in .GlobalEnv (note, though, that the 'path' attribute does get set OK). For various reasons, this feature is crucial to me, so I can't actually use R1.5.0 without it! Oddly, my code used to explicitly set a path attribute for newly-attached things using this mechanism, and this has now been incorporated into R1.5.0 "library" command. So I'm clearly not doing anything naughty here! A suggestion: wouldn't it be easier if we could use attr( env, <<whatever>>) # where env is an environment and attr( env, <<whatever>>)_ 45 instead of having to go via "lib.fixup"? cheers Mark -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._