Arguments
- x
a data frame, matrix of sparse matrix.
- sample
a integer or NULL
. Number of rows to sample to estimate
sparsity. If NULL
then no sampling is performed. Will not be used when
x
is a sparse matrix. Defaults to NULL
.
Value
a single number, between 0 and 1.
Details
Only numeric 0s are considered zeroes in this calculations. Missing values,
logical vectors and then string "0"
aren't counted.