Skip to content
Prev 13969 / 398503 Next

Accessing just the value of an object but not the attributes

I see the role of as.vector().
But even if as.vector() needs to keep its attribute-dropping
side-effect for compatibility reasons, wouldn't
a dropattr() still be a good idea?
For instance, I can assign attributes to closures, but
wont get rid of them using as.vector() - and neither
using as.function() by the way ...
So if I dont know in advance what kind of object it is
and I do want to just access the "value" in any case
I have to check the type ... ?


Johann
Martin Maechler wrote:

            
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._