Hello, I have an empty environment named env. Now I want the locally created objects in some function (foo) to appear in env. Within the function I want to have straight forward code, no assign operation or env$x etc. in front of every command. What is the best way to do that?
Example: foo <- function(){ x <- 1 y <- 2 } env <- new.env() Now I want to evaluate foo() but have the local variables x and y appear in env. Thanks ---Mark –––––––––––––––––––––––––––––––––––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com ______________________________________________ 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.