Hi folks, I find I don't understand something about lists and attributes. Here's a little code snippet followed by an explanation.
> rm(list=ls()) > el <- list() > a <- list(a="a") > attr(a,"b") <- "foo" > attributes(a) $names  "a" $b  "foo" > el <- a > el []  "a" > attributes(el) NULL > attributes(el) NULL > attributes(el[]) NULL
I've made an empty list named
el and another list called
a. I assigned
a the attribute
b with value "foo", which seems to work fine.
I then assigned the first element of
el to be the list
a. This seems to work fine.
But when I try to access the elements of
el and recover the attribute it doesn't work.
Clearly, there's something I don't understand. (I hope it's something dumb rather than something deep.)