
Convert a SparseM matrix.csr to Matrix Market Format
Source:R/fastMatMR-package.R
SparseM_to_fmm.RdThis function takes a SparseM matrix.csr and converts it into a Matrix Market file.
Examples
csr <- SparseM::as.matrix.csr(matrix(c(1, 0, 0, 2), nrow = 2))
SparseM_to_fmm(csr, tempfile(fileext = ".mtx"))
#> [1] TRUE