sparsity function

Calculate sparsity of data frames, matrices, and sparse matrices