.BG
.FN attr
.TL
Attribute of an Object
.CS
attr(x, which)
.AG x
any object
.AG which
character string specifying an attribute of `x'.
.RT
the `which' attribute of `x', if it exists; `NULL' otherwise.
This function may be used on the left of an assignment to
initialize or change attributes of objects.
For the attributes like `dim' that are known internally to S,
the assignment will only be accepted if it satisfies requirements
for that attribute (for example, the length of `x' must equal the
product of the dimensions).
See the documentation for individual attributes.
`attr' may also be used to set and get user-defined attributes.
To explicitly delete the `which' attribute of `x', use
`attr(x, which) <- NULL'.
.PP
The semantics of `attr' are defined by saying that `attr(x,which)'
is equivalent to `attributes(x)[[which]]' for either extracting
or replacing attributes,
with the restriction that `which' is interpreted as mode character.
The value of `attributes(x)' is a list object (possibly of length 0)
associated implicitly with any object `x'.
See `Subscripts' for the semantics of
.Cq [[ .
.SE
An attribute of `x' will be changed as a result of the assignment
version of this function.
.SA
For attributes known to S, see the documentation for
`names', `dim',
`dimnames', `tsp', and `levels'.
.EX
attr(m, "dimnames")     # equivalent to dimnames(x)
	# a possible way to store documentation with x
attr(x, "doc") <- doc
.KW attribute
.WR
