nnz {pracma} | R Documentation |
Nonzero Elements
Description
Number of non-zero elements.
Usage
nnz(x)
Arguments
x |
a numeric or complex vector or matrix. |
Value
the number of non-zero elements of x
.
See Also
Examples
nnz(diag(10))
[Package pracma version 2.4.4 Index]