nnz.Rd
Number of non-zero elements.
nnz(x)
a numeric or complex vector or matrix.
the number of non-zero elements of x.
x
find
nnz(diag(10)) #> [1] 10