The R Project SVN R

Rev

Rev 74402 | Rev 88060 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 74402 Rev 74911
Line 13... Line 13...
13
  The first form below returns the object's attribute list.
13
  The first form below returns the object's attribute list.
14
  The replacement forms uses the list on the right-hand
14
  The replacement forms uses the list on the right-hand
15
  side of the assignment as the object's attributes (if appropriate).
15
  side of the assignment as the object's attributes (if appropriate).
16
}
16
}
17
\usage{
17
\usage{
18
attributes(obj)
18
attributes(x)
19
attributes(obj) <- value
19
attributes(x) <- value
20
mostattributes(obj) <- value
20
mostattributes(x) <- value
21
}
21
}
22
\arguments{
22
\arguments{
23
  \item{obj}{an object}
23
  \item{x}{any \R object}
24
  \item{value}{an appropriate named list of attributes, or \code{NULL}.}
24
  \item{value}{an appropriate named \code{\link{list}} of attributes, or
-
 
25
    \code{NULL}.}
25
}
26
}
26
\details{
27
\details{
27
  Unlike \code{\link{attr}} it is possible to set attributes on a
28
  Unlike \code{\link{attr}} it is not an error to set attributes on a
28
  \code{NULL} object: it will first be coerced to an empty list.
29
  \code{NULL} object: it will first be coerced to an empty list.
29
 
30
 
30
  Note that some attributes (namely \code{\link{class}},
31
  Note that some attributes (namely \code{\link{class}},
31
  \code{\link{comment}}, \code{\link{dim}}, \code{\link{dimnames}},
32
  \code{\link{comment}}, \code{\link{dim}}, \code{\link{dimnames}},
32
  \code{\link{names}}, \code{\link{row.names}} and
33
  \code{\link{names}}, \code{\link{row.names}} and