Rev 24300 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{attr}\alias{attr}\alias{attr<-}\title{Object Attributes}\description{Get or set specific attributes of an object.}\usage{attr(x, which)attr(x, which) <- value}\arguments{\item{x}{an object whose attributes are to be accessed.}\item{which}{a character string specifying which attribute is to beaccessed.}\item{value}{an object, the new value of the attribute.}}\value{This function provides access to a single object attribute. Thesimple form above returns the value of the named attribute. Theassignment form causes the named attribute to take the value on theright of the assignment symbol.The first form first looks for an exact match to \code{code} amongst theattributed of \code{x}, then a partial match. If no exact match isfound and more than one partial match is found, the result is \code{NULL}.}\references{Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)\emph{The New S Language}.Wadsworth \& Brooks/Cole.}\seealso{\code{\link{attributes}}}\examples{# create a 2 by 5 matrixx <- 1:10attr(x,"dim") <- c(2, 5)}\keyword{attribute}