read_named_MM {ReDaMoR} | R Documentation |
Read a named sparse matrix in MatrixMarket text format
Description
Read a named sparse matrix in MatrixMarket text format
Usage
read_named_MM(
file,
skip = 0,
n_max = Inf,
class = c("dgCMatrix", "tibble"),
guess_max = 20
)
Arguments
file |
the file to read |
skip |
the number of records to skip (default: 0) |
n_max |
the maximum number of records to read (default: Inf) |
class |
the class of object to return. By default a "dgCMatrix". If "tibble" is chosen, the sparse matrix is returned as a tibble with 3 columns: i (row index), j (column index) and x (values) and an "header" attribute containing the matrix rownames and colnames. |
guess_max |
the number of lines to read to find the header.
(see |
Value
By default a dgCMatrix. If the "tibble" class is chosen, the sparse matrix is returned as a tibble with 3 columns: i (row index), j (column index) and x (values) and an "header" attribute containing the matrix rownames and colnames.
[Package ReDaMoR version 0.7.6 Index]