externalMatrix {externalVector} | R Documentation |
This function can be used to create a new external matrix object.
externalMatrix(data = NA, nrow = 1, ncol = 1, byrow = FALSE, dimnames = NULL, storageClass = (if (is(data, "externalVectorWithStorage")) class(data@storage) else "simpleStorage"), indirect = FALSE)
data |
An optional data vector. |
nrow |
The desired number of rows. |
ncol |
The desired number of columns. |
byrow |
Not used. |
dimnames |
A dimnames value for the external matrix: a
list of length 2. |
storageClass |
name of the subclass of "externalStorage" to be used for storing the external vector elements. |
indirect |
If TRUE , return an
"indirectExternalVector" object. |
This function is similar to the matrix
function in R base package.
If indirect
is 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.
x <- externalMatrix(1:6, nrow=2, ncol=3) dim(x) x[1, 1:2] # drop = FALSE by default log(x)