sparsity() estimates the percentage of entries in a given data matrix D
whose values are "practically zero". If the absolute value of an entry is
below a given threshold parameter thresh, then that value is determined
to be "practically zero", increasing the estimated sparsity of D. Note
that NA values are imputed as 0 before the sparsity calculation is made.
Usage
sparsity(D, thresh = 1e-04)
Value
The sparsity of D, measured as the percentage of entries in D
that are "practically zero".
Arguments
D
The input data matrix.
thresh
(Optional) A numeric threshold >= 0 used to determine if an
entry in D is "practically zero". If the absolute value of an entry is
below thresh, then it is judged to be "practically zero". By default,
thresh = 1e-04.