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

About this list Date view Thread view Subject view Author view Attachment view

From: David Andel (andel@ifi.unizh.ch)
Date: Thu 24 Apr 2003 - 17:40:48 EST


Message-id: <20030424094048.1.10758.qmail@ifi.unizh.ch>

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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:43 EST