Message: 42
Date: Mon, 3 Jan 2011 18:58:04 -0200
From: Eduardo de Oliveira Hortaeduardo.oliveiraho...@gmail.com
To: r-helpr-help@r-project.org
Subject: Re: [R] Saving objects inside a list
Message-ID:
aanlktimbxmr0rusiws1grorhjh=wstofzqdoc-90z...@mail.gmail.com
Content-Type: text/plain
: [R] Saving objects inside a list
Message-ID:
aanlktimbxmr0rusiws1grorhjh=wstofzqdoc-90z...@mail.gmail.com
Content-Type: text/plain
sapply(ls(),get) works fine. Thanks.
ps: the as.list and the eapply suggestions didn't work.
Hi Eduardo (and all the best for this new year
-project.org
Subject: Re: [R] Saving objects inside a list
Hello, (and a happy new year for you too!)
Apparently the problem is happening only within my RKWard sessions:
B = 1000
oblist = as.list(.GlobalEnv)
str(oblist)
List of 1
$ B:function (value)
oblist$B
function (value
Hello there,
any ideas on how to save all the objects on my workspace inside a list
object?
For example, say my workspace is as follows
ls()
[1] x y z
and suppose I want to put these objects inside a list object, say
object.list - list()
without having to explicitly write down their names as
Try this:
sapply(ls(pattern = x|y|z), get, simplify = F)
On Mon, Jan 3, 2011 at 3:25 PM, Eduardo de Oliveira Horta
eduardo.oliveiraho...@gmail.com wrote:
Hello there,
any ideas on how to save all the objects on my workspace inside a list
object?
For example, say my workspace is as
Thanks, but this is still too restrictive... I wanted something that could
actually save objects with arbitrary names inside a list object...
On Mon, Jan 3, 2011 at 3:39 PM, Henrique Dallazuanna www...@gmail.comwrote:
Try this:
sapply(ls(pattern = x|y|z), get, simplify = F)
On Mon, Jan 3,
On Mon, Jan 3, 2011 at 12:25 PM, Eduardo de Oliveira Horta
eduardo.oliveiraho...@gmail.com wrote:
Hello there,
any ideas on how to save all the objects on my workspace inside a list
object?
For example, say my workspace is as follows
ls()
[1] x y z
and suppose I want to put these objects
Remove the pattern argument:
sapply(ls(), get, simplify = F)
On Mon, Jan 3, 2011 at 3:51 PM, Eduardo de Oliveira Horta
eduardo.oliveiraho...@gmail.com wrote:
Thanks, but this is still too restrictive... I wanted something that could
actually save objects with arbitrary names inside a list
Eduardo,
Try this:
object.list - sapply(objects(), function(x) get(x), simplify=F,
USE.NAMES=T)
Dave
From:
Eduardo de Oliveira Horta eduardo.oliveiraho...@gmail.com
To:
r-help r-help@r-project.org
Date:
01/03/2011 11:32 AM
Subject:
[R] Saving objects inside a list
Sent by:
r-help-boun...@r
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Eduardo de
Oliveira Horta
Sent: Monday, January 03, 2011 9:25 AM
To: r-help
Subject: [R] Saving objects inside a list
Hello there,
any ideas on how to save all
Hi Eduardo,
Try
r - ls()
result - sapply(r, get)
result
HTH,
Jorge
On Mon, Jan 3, 2011 at 12:25 PM, Eduardo de Oliveira Horta wrote:
Hello there,
any ideas on how to save all the objects on my workspace inside a list
object?
For example, say my workspace is as follows
ls()
[1] x y z
sapply(ls(),get) works fine. Thanks.
ps: the as.list and the eapply suggestions didn't work.
On Mon, Jan 3, 2011 at 3:56 PM, Jorge Ivan Velez
jorgeivanve...@gmail.comwrote:
Hi Eduardo,
Try
r - ls()
result - sapply(r, get)
result
HTH,
Jorge
On Mon, Jan 3, 2011 at 12:25 PM, Eduardo
On Mon, Jan 3, 2011 at 3:58 PM, Eduardo de Oliveira Horta
eduardo.oliveiraho...@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)
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Eduardo de
Oliveira Horta
Sent: Monday, January 03, 2011 12:58 PM
To: r-help
Subject: Re: [R] Saving objects inside a list
sapply(ls(),get) works fine. Thanks.
ps
14 matches
Mail list logo