dense_2sparse: convert a dense matrix to a sparse matrix

View source: R/utils.R

dense_2sparseR Documentation

convert a dense matrix to a sparse matrix

Description

convert a dense matrix to a sparse matrix

Usage

dense_2sparse(dense_mat)

Arguments

dense_mat

a dense matrix

Value

a sparse matrix

Examples


library(textTinyR)

tmp = matrix(sample(0:1, 100, replace = TRUE), 10, 10)

sp_mat = dense_2sparse(tmp)

mlampros/textTinyR documentation built on Jan. 17, 2024, 1:18 a.m.