| Line 39... |
Line 39... |
| 39 |
vector which is stored with additional \link{attributes} giving the
|
39 |
vector which is stored with additional \link{attributes} giving the
|
| 40 |
dimensions (attribute \code{"dim"}) and optionally names for those
|
40 |
dimensions (attribute \code{"dim"}) and optionally names for those
|
| 41 |
dimensions (attribute \code{"dimnames"}).
|
41 |
dimensions (attribute \code{"dimnames"}).
|
| 42 |
|
42 |
|
| 43 |
A two-dimensional array is the same thing as a \code{\link{matrix}}.
|
43 |
A two-dimensional array is the same thing as a \code{\link{matrix}}.
|
| 44 |
|
44 |
|
| 45 |
One-dimensional arrays often look like vectors, but may be handled
|
45 |
One-dimensional arrays often look like vectors, but may be handled
|
| 46 |
differently by some functions: \code{\link{str}} does distinguish
|
46 |
differently by some functions: \code{\link{str}} does distinguish
|
| 47 |
them in recent versions of \R.
|
47 |
them in recent versions of \R.
|
| 48 |
|
48 |
|
| 49 |
The \code{"dim"} attribute is an integer vector of length one or more
|
49 |
The \code{"dim"} attribute is an integer vector of length one or more
|
| Line 51... |
Line 51... |
| 51 |
the length of the array.
|
51 |
the length of the array.
|
| 52 |
|
52 |
|
| 53 |
The \code{"dimnames"} attribute is optional: if present it is a list
|
53 |
The \code{"dimnames"} attribute is optional: if present it is a list
|
| 54 |
with one component for each dimension, either \code{NULL} or a
|
54 |
with one component for each dimension, either \code{NULL} or a
|
| 55 |
character vector of the length given by the element of the
|
55 |
character vector of the length given by the element of the
|
| 56 |
\code{"dim"} attribute for that dimension.
|
56 |
\code{"dim"} attribute for that dimension.
|
| 57 |
|
57 |
|
| 58 |
\code{is.array} is a \link{primitive} function.
|
58 |
\code{is.array} is a \link{primitive} function.
|
| 59 |
}
|
59 |
}
|
| 60 |
\value{
|
60 |
\value{
|
| 61 |
\code{array} returns an array with the extents specified in \code{dim}
|
61 |
\code{array} returns an array with the extents specified in \code{dim}
|
| 62 |
and naming information in \code{dimnames}. The values in \code{data} are
|
62 |
and naming information in \code{dimnames}. The values in \code{data} are
|