Closed privefl closed 3 years ago
There is a function drop0
in package {Matrix} for that.
https://stat.ethz.ch/R-manual/R-devel/library/Matrix/html/drop0.html
Even though it would probably be more efficient to do drop0 + conversion in one step, I do not think it is worth the effort. Closing for now.
If some 0s are actually stored in the sparse format, these could be removed ideally. This would make the conversion a bit harder (need to test if 0 and remove 0s from the total size). This would probably be extra difficult for the symmetric matrices.