o de
> > Oliveira Horta
> > Sent: Tuesday, January 04, 2011 6:25 AM
> > To: r-help@r-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 withi
oblist$B
[1] 1000
Problem solved?
Best regards,
Eduardo Horta
On Tue, Jan 4, 2011 at 9:41 AM, Olivier ETERRADOSSI <
olivier.eterrado...@mines-ales.fr> wrote:
> Message: 42
>> Date: Mon, 3 Jan 2011 18:58:04 -0200
>> From: Eduardo de Oliveira Horta
>>
>> To: r-
Message: 42
Date: Mon, 3 Jan 2011 18:58:04 -0200
From: Eduardo de Oliveira Horta
To: r-help
Subject: Re: [R] Saving objects inside a list
Message-ID:
Content-Type: text/plain
sapply(ls(),get) works fine. Thanks.
ps: the as.list and the eapply suggestions didn't work.
Hi Eduardo
> -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(l
On Mon, Jan 3, 2011 at 3:58 PM, Eduardo de Oliveira Horta
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
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
wrote:
> Hi Eduardo,
>
> Try
>
> r <- ls()
> result <- sapply(r, get)
> result
>
> HTH,
> Jorge
>
>
> On Mon, Jan 3, 2011 at 12:25 PM, Eduardo de Oliveira
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()
> -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,
>
Eduardo,
Try this:
object.list <- sapply(objects(), function(x) get(x), simplify=F,
USE.NAMES=T)
Dave
From:
Eduardo de Oliveira Horta
To:
r-help
Date:
01/03/2011 11:32 AM
Subject:
[R] Saving objects inside a list
Sent by:
r-help-boun...@r-project.org
Hello there,
any ideas on how
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 lis
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"
>
> and suppose I want to put these objects inside a list o
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 wrote:
> Try this:
>
> sapply(ls(pattern = "x|y|z"), get, simplify = F)
>
>
> On Mon, Jan 3, 2011 at 3
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
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 nam
14 matches
Mail list logo