\name{externalMatrix} \alias{externalMatrix} \title{ Create an external matrix object } \description{ This function can be used to create a new external matrix object. } \usage{ externalMatrix(data = NA, nrow = 1, ncol = 1, byrow = FALSE, dimnames = NULL, storageClass = (if (is(data, "externalVectorWithStorage")) class(data@storage) else "simpleStorage"), indirect = FALSE) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{data}{ An optional data vector. } \item{nrow}{ The desired number of rows. } \item{ncol}{ The desired number of columns. } \item{byrow}{ Not used. } % \item{byrow}{ Logical. If 'FALSE' (the default) the matrix is filled by % columns, otherwise the matrix is filled by rows. } \item{dimnames}{ A \code{dimnames} value for the external matrix: a \code{list} of length 2. } \item{storageClass}{ name of the subclass of "externalStorage" to be used for storing the external vector elements. } \item{indirect}{ If \code{TRUE}, return an "indirectExternalVector" object. } } \details{ This function is similar to the \code{matrix} function in \R base package. } \value{ If \code{indirect} is \code{FALSE} (the default) a new external matrix object with correct dimension and dimnames. Otherwise create a new external vector object but return it by wrapping it in an "indirectExternalMatrix" object with the correct dimension and dimnames. } \seealso{ \code{\link{matrix}} } \examples{ x <- externalMatrix(1:6, nrow=2, ncol=3) dim(x) x[1, 1:2] # drop = FALSE by default log(x) } \keyword{ array }