Cleaning up sparse matrices
cleanup.RdEliminates an zeros in a sparse matrix.
Usage
cleanup(x, eps = getOption("spam.eps"))Details
A sparse matrix may still contain zeros. This function (aliased
to as.spam) filters these values.
This often causes confusion when testing such matrices for symmetry
or comparing apparently equal matrices with all.equal
(see ‘Examples’ below.