read.matrix(file, header = FALSE, skip = 1, row.ids = NULL, col.ids = NULL,
colClasses = c('character','character','numeric'),
assign.fn = assignMatrixTriplet, filter.fn = NULL, ...) The primary benefit of this function is that named rows and columns can be
used as opposed to integer indexes, as compared to the slam package.
The other main motivation is that if the memory is available, dense matrix
calculations can be faster than their sparse counterparts, not to mention
having a wider range of operators available.
When header == TRUE, the row names and/or column names are read from the file. The names are expected to be comma separated in a single line.
Various methods can be used to construct a sparse matrix representation that is used as the basis for constructing the dense matrix. The default function, 'assignMatrixTriplet' uses the 'slam' package under the hood. The 'assignMatrixSparse' uses SparseM and a CSR representation, while 'assignMatrixDense' is a naive brute force construction that is not optimized.