Re: [R] access objects

2011-09-08 Thread Petr PIKAL
x27;s exactly it. > get gets it ;-) > > Berry > > > From: michael.weyla...@gmail.com > Date: Wed, 7 Sep 2011 14:54:48 -0500 > Subject: Re: [R] access objects > To: berryboessenk...@hotmail.com > CC: r-help@r-project.org > > The get() function should get you

Re: [R] access objects

2011-09-07 Thread Berry Boessenkool
Thanks! That's exactly it. get gets it ;-) Berry From: michael.weyla...@gmail.com Date: Wed, 7 Sep 2011 14:54:48 -0500 Subject: Re: [R] access objects To: berryboessenk...@hotmail.com CC: r-help@r-project.org The get() function should get you where you need. Michael Weylandt On Wed

Re: [R] access objects

2011-09-07 Thread R. Michael Weylandt
The get() function should get you where you need. Michael Weylandt On Wed, Sep 7, 2011 at 12:53 PM, Berry Boessenkool < berryboessenk...@hotmail.com> wrote: > > > hi, > > say I have consecutively numbered objects obj1, obj2, ... in my R > workspace. > I want to acces one of them inside a functio

[R] access objects

2011-09-07 Thread Berry Boessenkool
hi, say I have consecutively numbered objects obj1, obj2, ... in my R workspace. I want to acces one of them inside a function, with the number given as an argument. Where can I find help on how to do that? Somebody must have been trying to do this before... Some keywords to start a search ar

Re: [R] access objects by name

2011-06-20 Thread jim holtman
for (thisOne in structs){ print(get(thisOne)$colA) } you need to 'get' (retrieve) the object first. On Mon, Jun 20, 2011 at 5:18 PM, Noah Silverman wrote: > Hi, > > I have several data structures (xts structures).  I then have a list of the > names of those objects. > > I'd like to access t

[R] access objects by name

2011-06-20 Thread Noah Silverman
Hi, I have several data structures (xts structures). I then have a list of the names of those objects. I'd like to access the object by name. For example: foo1 <- as.xts() foo2 <- as.xts(...) foo3 <- as.xts(...) structs <- c("foo1", "foo2", "foo3") for (thisOne in structs){ prin

Re: [R] access objects in my environment

2010-05-13 Thread arnaud Gaboury
Wonderful!! TY so much for the help. > -Original Message- > From: Patrizio Frederic [mailto:frederic.patri...@gmail.com] > Sent: Thursday, May 13, 2010 10:47 AM > To: arnaud Gaboury > Cc: r-help@r-project.org > Subject: Re: [R] access objects in my environment >

Re: [R] access objects in my environment

2010-05-13 Thread Patrizio Frederic
Hi, have a look at function 'get' (and function 'assign' too) In your example: x <- 1000 assign(paste('Pos',x,sep=''),rnorm(100)) Pos1000 posa <- get(paste(c("Pos",x),collapse="")) posa hope it's help PF On Thu, May 13, 2010 at 10:37 AM, arnaud Gaboury wrote: > Dear group, > > Here are my obj

[R] access objects in my environment

2010-05-13 Thread arnaud Gaboury
Dear group, Here are my objects in my environment: > ls() [1] "Pos100415" "Pos100416" "posA" "pose15""pose16""pose16t" "position" "trade" "x" I need to pass the object "Pos100415" to a function. This element is a data.frame, obtained through a function: Pos(x)<-myfun(x) with