[R] access objects in my environment

arnaud Gaboury arnaud.gaboury at gmail.com
Thu May 13 10:37:32 CEST 2010


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 x<-100415 in
this example.

If I do this :

>posA<-paste(c("Pos",100415),collapse="") #I can't use directly Pos100415.I
need to access it via paste(c("Pos",x),collapse="") in general.

Here is what I got :

>> posA
[1] "Pos100415"

It is certainly not what I want, as I need to have posA as the same
data.frame than Pos100415.

Any help?

TY



More information about the R-help mailing list