colZeros | R Documentation |
Produces the same result as applying sum(x == 0)
to each row or column.
colZeros(x)
rowZeros(x)
x |
matrix or Matrix object |
mt <- Matrix::rsparsematrix(100, 100, 0.01)
colZeros(mt)
apply(mt, 2, function(x) sum(x == 0)) # the same
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.