Description Usage Arguments Value See Also Examples
This function creates an empty LinkedMatrix
object of a certain
size, a certain number of nodes, and certain types of nodes.
1 | 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # 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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.