See the Object class in the R.oo package. /Henrik
On Thu, Aug 14, 2008 at 7:35 PM, Abiel Reinhart <[EMAIL PROTECTED]> wrote:
> I would like to use a text string to get a reference to an object whose name
> is the text string. I have seen people using get() for this purpose, but as
> far as I can
Try this:
x <- 1
z <- as.name ("x")
eval (call ("<-", z, call ("attr<-", z, "foo", "bar")))
x
[1] 1
attr(,"foo")
[1] "bar"
On 15 авг, 06:35, "Abiel Reinhart" <[EMAIL PROTECTED]> wrote:
> I would like to use a text string to get a reference to an object whose name
> is the text string. I have seen
2 matches
Mail list logo