Learn R Programming

fuj (version 0.2.1)

exattr: Exact attributes

Description

Get the exact attributes of an object

Usage

exattr(x, which)

x %attr% which

Value

See base::attr

Arguments

x

an object whose attributes are to be accessed.

which

a non-empty character string specifying which attribute is to be accessed.

Examples

Run this code
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