.BG
.FN dim
.TL
Dim Attribute of an Object
.CS
dim(x)
dim(x) <- value
.AG x
any object.
.AG value
numeric vector suitable to be the dimensions of `x', or `NULL'.
.RT
if `x' has a `dim' attribute (i.e., `x' is an array)
then this attribute is returned; otherwise `NULL'.
The `dim' attribute is used for subset selection; see `subset'.
It is an integer vector, with the property that
`prod(dim(x))==length(x)'.
Assigning to `dim(x)' merely establishes or changes the
`dim' attribute of `x'; no reordering of the elements
of `x' is implied.
.EX
dim(iris) # returns c(50,4,3)
length(dim(y)) # number of dimensions of y
if(!is.null(dim(z))) { .. z .. } # do not operate on non-array data
if(is.array(z)) { .. z .. } # better way to do the same thing
.KW array
.KW attribute
.WR
