powered by
sparsity percentage of a sparse matrix
matrix_sparsity(sparse_matrix)
a sparse matrix
a numeric value (percentage)
# NOT RUN { library(textTinyR) tmp = matrix(sample(0:1, 100, replace = TRUE), 10, 10) sp_mat = dense_2sparse(tmp) dbl = matrix_sparsity(sp_mat) # }
Run the code above in your browser using DataLab