cbind2-method | R Documentation |
'cbind2' method for the CSR and COO 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 'TsparseMatrix,TsparseMatrix'
cbind2(x, y)
## S4 method for signature 'TsparseMatrix,sparseVector'
cbind2(x, y)
## S4 method for signature 'sparseVector,TsparseMatrix'
cbind2(x, y)
## S4 method for signature 'CsparseMatrix,sparseVector'
cbind2(x, y)
## S4 method for signature 'sparseVector,CsparseMatrix'
cbind2(x, y)
## S4 method for signature 'sparseVector,sparseVector'
cbind2(x, y)
## S4 method for signature 'RsparseMatrix,RsparseMatrix'
cbind2(x, y)
## S4 method for signature 'TsparseMatrix,RsparseMatrix'
cbind2(x, y)
## S4 method for signature 'RsparseMatrix,TsparseMatrix'
cbind2(x, y)
## S4 method for signature 'RsparseMatrix,numeric'
cbind2(x, y)
## S4 method for signature 'RsparseMatrix,integer'
cbind2(x, y)
## S4 method for signature 'RsparseMatrix,logical'
cbind2(x, y)
## S4 method for signature 'RsparseMatrix,sparseVector'
cbind2(x, y)
## S4 method for signature 'numeric,RsparseMatrix'
cbind2(x, y)
## S4 method for signature 'integer,RsparseMatrix'
cbind2(x, y)
## S4 method for signature 'logical,RsparseMatrix'
cbind2(x, y)
## S4 method for signature 'sparseVector,RsparseMatrix'
cbind2(x, y)
x |
First matrix to concatenate. |
y |
Second matrix to concatenate. |
A sparse matrix (storage order varying depending on the input types).
library(Matrix)
library(MatrixExtra)
set.seed(1)
X <- rsparsematrix(3, 4, .3)
X <- as(X, "TsparseMatrix")
inherits(cbind2(X, X), "TsparseMatrix")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.