[R] Saving objects inside a list
Gabor Grothendieck
ggrothendieck at gmail.com
Mon Jan 3 22:02:41 CET 2011
On Mon, Jan 3, 2011 at 3:58 PM, Eduardo de Oliveira Horta
<eduardo.oliveirahorta at gmail.com> wrote:
> sapply(ls(),get) works fine. Thanks.
>
> ps: the as.list and the eapply suggestions didn't work.
>
They work for me. Starting in a fresh session:
> x <- 1; f <- function(x) x; DF <- data.frame(a = 1:3)
> as.list(.GlobalEnv)
$DF
a
1 1
2 2
3 3
$f
function (x)
x
$x
[1] 1
> eapply(.GlobalEnv, identity)
$DF
a
1 1
2 2
3 3
$f
function (x)
x
$x
[1] 1
--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com
More information about the R-help
mailing list