Relative Content

Tag Archive for rsparse-matrix

Efficiently combining sparse and dense sub matrices with R Matrix package

The following code will create a sparse matrix w and a dense matrix v and combines them horizontally. The result is efficiently stored, preserving the sparsity in w. Is this the best way to do this? Will downstream computations on the combined matrix be efficient? Note that in my ultimate application the sparse matrix will be much, much larger and will usually be larger than the dense matrix.