Description Usage Arguments Details Value Author(s) Examples
Show the sparsity (as a count or proportion) of a matrix. For example, .99 sparsity means 99% of the values are zero. Similarly, a sparsity of 0 means the matrix is fully dense.
1 |
x |
The matrix, stored as an ordinary R matrix or as a "simple triplet matrix" (from the slam package). |
proportion |
Logical; should a proportion or a count be returned? |
The implementation is very efficient for dense matrices. For sparse triplet matrices, the count is trivial.
The sparsity of the input matrix, as a proportion or a count.
Drew Schmidt
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.