Extra Methods for Sparse Matrices

Extends sparse matrix and vector classes from the 'Matrix' package by providing: (a) Methods and operators that work natively on CSR formats (compressed sparse row, a.k.a. 'RsparseMatrix') such as slicing/sub-setting, assignment, rbind(), mathematical operators for CSR and COO such as addition ("+") or sqrt(), and methods such as diag(); (b) Multi-threaded matrix multiplication and cross-product for many types, including the 'float32' type from 'float'; (c) Coercion methods between pairs of classes which are not present in 'Matrix', such as 'dgCMatrix' -> 'ngRMatrix', as well as convenience conversion functions; (d) Utility functions for sparse matrices such as sorting the indices or removing zero-valued entries; (e) Fast transposes that work by outputting in the opposite storage format; (f) Faster replacements for many 'Matrix' methods for all sparse types, such as slicing and elementwise multiplication. (g) Convenience functions for sparse objects, such as 'mapSparse' or a shorter 'show' method.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("MatrixExtra")

0.1.15 by David Cortes, 3 years ago


https://github.com/david-cortes/MatrixExtra


Report a bug at https://github.com/david-cortes/MatrixExtra/issues


Browse source code at https://github.com/cran/MatrixExtra


Authors: David Cortes [aut, cre, cph] , Dmitry Selivanov [cph] , Thibaut Goetghebuer-Planchon [cph] (Copyright holder of included robinmap library) , Martin Maechler [cph] (Copyright holder of 'Matrix' package from which some code was taken) , Robert Gentleman [cph] (Copyright holder of mathematical functions used by base R which were copied) , Ross Ihaka [cph] (Copyright holder of mathematical functions used by base R which were copied)


Documentation:   PDF Manual  


GPL (>= 2) license


Imports Rcpp, RhpcBLASctl, float

Depends on Matrix, methods

Suggests testthat, data.table, knitr, rmarkdown

Linking to Rcpp


Imported by PlotNormTest, recometrics, rsparse.

Depended on by CareDensity.

Suggested by RcppBlaze, cmfrec, readsparse, rpc.


See at CRAN