powered by
Get the exact attributes of an object
exattr(x, which)x %attr% which
x %attr% which
See base::attr
an object whose attributes are to be accessed.
a non-empty character string specifying which attribute is to be accessed.
foo <- struct(list(), "foo", aa = TRUE) attr(foo, "a") # TRUE : partial match successful exattr(foo, "a") # NULL : partial match failed exattr(foo, "aa") # TRUE : exact match
Run the code above in your browser using DataLab