Hi, all,
Can anyone tell me what this line in library() does?
.Internal(lib.fixup(env, .GlobalEnv))
The reason I ask is that I'm writing a function that uses a bit of library()
code, and I want to know if I should include it:
g.data.attach <- function(dir, pos=2) {
env <- attach(NULL, pos, paste("package",basename(dir),sep=":"))
attr(env, "path") <- dir
sys.source(file.path(dir, "R", basename(dir)), env, keep.source=F)
}
Thanks! I'll try to make this my last message for today!
-- David Brahm (brahm at alum.mit.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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
lib.fixup
2 messages · David Brahm, Thomas Lumley
On Fri, 12 Oct 2001, David Brahm wrote:
Hi, all, Can anyone tell me what this line in library() does? .Internal(lib.fixup(env, .GlobalEnv))
It mangles the environments of the objects you've created so that they aren't saved with the rest of the workspace. -thomas Thomas Lumley Asst. Professor, Biostatistics tlumley at u.washington.edu 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._