Create an Empty, Prespecified LinkedMatrix Object
This function creates an empty LinkedMatrix
object of a certain
size, a certain number of nodes, and certain types of nodes.
LinkedMatrix(nrow, ncol, nNodes, linkedBy, nodeInitializer, ...)
nrow |
The number of rows of the whole matrix. |
ncol |
The number of columns of the whole matrix. |
nNodes |
The number of nodes. |
linkedBy |
Whether the matrix is linked by |
nodeInitializer |
The name of a function or a function |
... |
Additional arguments passed into the |
A ColumnLinkedMatrix
object if linkedBy
is columns
or
a RowLinkedMatrix
object if linkedBy
is rows
.
ColumnLinkedMatrix
and RowLinkedMatrix
to
create ColumnLinkedMatrix
and RowLinkedMatrix
objects from a
list of matrix-like objects.
# Create an empty 15x10 RowLinkedMatrix with 3 matrix nodes m1 <- LinkedMatrix(nrow = 15, ncol = 10, nNodes = 3, linkedBy = "rows", nodeInitializer = "matrixNodeInitializer") dim(m1) nNodes(m1) all(sapply(m1, inherits, "matrix")) # Create an empty 15x10 RowLinkedMatrix with 3 ff nodes m2 <- LinkedMatrix(nrow = 15, ncol = 10, nNodes = 3, linkedBy = "rows", nodeInitializer = "ffNodeInitializer", vmode = "byte") dim(m2) nNodes(m2) all(sapply(m2, inherits, "ff_matrix")) # Create an empty 15x10 RowLinkedMatrix with 3 big.matrix nodes m3 <- LinkedMatrix(nrow = 15, ncol = 10, nNodes = 3, linkedBy = "rows", nodeInitializer = function(nodeIndex, nrow, ncol, ...) { bigmemory::big.matrix(nrow = nrow, ncol = ncol) }) dim(m3) nNodes(m3) all(sapply(m3, inherits, "big.matrix"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.