save_sparse_binary: save a sparse matrix in binary format

Description Usage Arguments Value Examples

View source: R/utils.R

Description

save a sparse matrix in binary format

Usage

1
save_sparse_binary(sparse_matrix, file_name = "save_sparse.mat")

Arguments

sparse_matrix

a sparse matrix

file_name

a character string specifying the binary file

Value

writes the sparse matrix to a file

Examples

1
2
3
4
5
6
7
library(textTinyR)

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

sp_mat = dense_2sparse(tmp)

# save_sparse_binary(sp_mat, file_name = "save_sparse.mat")

textTinyR documentation built on Oct. 26, 2021, 9:06 a.m.