[R] "export" an object froma function for access by ls()

David Andel andel at ifi.unizh.ch
Thu Apr 24 09:40:48 CEST 2003


I struggle with this very simple problem:

ls()
(empty)

giveval <- function() {
	x <- foo
	eval (x, envir=parent.frame(1))
}

ls()
(still empty)

I did not find anything more promising than eval for this purpose, but how 
only can I make it to have ls() return x?

David



More information about the R-help mailing list