rbind2-method | R Documentation |
'rbind2' method for the sparse matrix and sparse vector classes from 'Matrix', taking the most efficient route for the concatenation according to the input types.
## S4 method for signature 'RsparseMatrix,RsparseMatrix'
rbind2(x, y)
## S4 method for signature 'sparseVector,RsparseMatrix'
rbind2(x, y)
## S4 method for signature 'RsparseMatrix,sparseVector'
rbind2(x, y)
## S4 method for signature 'sparseVector,sparseVector'
rbind2(x, y)
## S4 method for signature 'CsparseMatrix,CsparseMatrix'
rbind2(x, y)
## S4 method for signature 'sparseVector,CsparseMatrix'
rbind2(x, y)
## S4 method for signature 'CsparseMatrix,sparseVector'
rbind2(x, y)
## S4 method for signature 'CsparseMatrix,CsparseMatrix'
rbind2(x, y)
## S4 method for signature 'RsparseMatrix,CsparseMatrix'
rbind2(x, y)
## S4 method for signature 'CsparseMatrix,RsparseMatrix'
rbind2(x, y)
## S4 method for signature 'RsparseMatrix,TsparseMatrix'
rbind2(x, y)
## S4 method for signature 'TsparseMatrix,RsparseMatrix'
rbind2(x, y)
## S4 method for signature 'RsparseMatrix,numeric'
rbind2(x, y)
## S4 method for signature 'RsparseMatrix,integer'
rbind2(x, y)
## S4 method for signature 'RsparseMatrix,logical'
rbind2(x, y)
## S4 method for signature 'numeric,RsparseMatrix'
rbind2(x, y)
## S4 method for signature 'integer,RsparseMatrix'
rbind2(x, y)
## S4 method for signature 'logical,RsparseMatrix'
rbind2(x, y)
## S4 method for signature 'TsparseMatrix,TsparseMatrix'
rbind2(x, y)
## S4 method for signature 'TsparseMatrix,sparseVector'
rbind2(x, y)
## S4 method for signature 'sparseVector,TsparseMatrix'
rbind2(x, y)
## S4 method for signature 'TsparseMatrix,CsparseMatrix'
rbind2(x, y)
## S4 method for signature 'CsparseMatrix,TsparseMatrix'
rbind2(x, y)
x |
First matrix to concatenate. |
y |
Second matrix to concatenate. |
A sparse matrix, usually in CSR format but some combinations might return COO or CSC.
library(Matrix)
library(MatrixExtra)
set.seed(1)
X <- rsparsematrix(3, 4, .3)
X <- as(X, "RsparseMatrix")
inherits(rbind2(X, X), "RsparseMatrix")
inherits(rbind(X, X, as.csc.matrix(X), X), "RsparseMatrix")
inherits(rbind2(as.coo.matrix(X), as.coo.matrix(X)), "TsparseMatrix")
inherits(rbind2(as.csc.matrix(X), as.csc.matrix(X)), "CsparseMatrix")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.