powered by
This function takes a sparse numeric matrix and converts it into a Matrix Market file.
A boolean indicating success or failure. Writes a MTX file to disk.
A sparse numeric matrix to be converted.
The name of the output file where the Matrix Market formatted data will be saved.
sparse_mat <- Matrix::Matrix(c(1, 0, 0, 2), nrow = 2, sparse = TRUE) sparse_Matrix_to_fmm(sparse_mat, tempfile(fileext = ".mtx"))
Run the code above in your browser using DataLab