is it possible to temporarily change the destination environment where
objects are written to?  I am thinking

  a <- new.env()
  attach(a)
  ### run some code, such as...
  b <- function(x) x
  detach(a)
  a$b

obviously, this is wrong.  attach() only attaches for read access.  I could
copy the globalenv, run my code, see what objects have been changed (how?),
move the changed and new functions into my a environment, and then restore
globalenv.  or is this already done somewhere else?

/iaw

----
Ivo Welch (ivo.we...@gmail.com)

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to