fmm_to_mat: Convert Matrix Market File to Matrix

View source: R/fastMatMR-package.R

fmm_to_matR Documentation

Convert Matrix Market File to Matrix

Description

This function reads a Matrix Market file and converts it to a matrix in R.

Usage

fmm_to_mat(filename)

Arguments

filename

The name of the input Matrix Market file to be read.

Value

A matrix containing the data read from the Matrix Market file.

Examples

# Create
sample_mat <- matrix(c(1, 2, 3, 4), nrow = 2)
temp_file_mat <- tempfile(fileext = ".mtx")
write_fmm(sample_mat, temp_file_mat)
# Read
mat <- fmm_to_mat(temp_file_mat)

fastMatMR documentation built on Nov. 4, 2023, 1:08 a.m.