Hadley Wickham writes in Advanced R (http://adv-r.had.co.nz/Data-structures.html):
All objects can have arbitrary additional attributes, used to store metadata about the object.
But what about the following:
> a <- as.symbol("a")
> attr(a, "attribute")
NULL
> attr(a, "attribute") <- "test"
Error in attr(a, "attribute") <- "test" :
cannot set attribute on a symbol
In the R documentation, the only thing I could find is that NULL cannot have attributes "as there is only one null object."
So what are the general rules that apply here?