readColMM | R Documentation |
Modified the 'Matrix::readMM' function for reading matrices stored in the Harwell-Boeing or MatrixMarket formats but only reads selected column.
readColMM(file, which.col, chunk = 1000L)
file |
the name of the file to be read from as a character scalar. Those storing matrices in the MatrixMarket format usually end in ".mtx". |
which.col |
An integer scalar, the column index |
chunk, |
An integer scalar indicating the chunk size to use, i.e., number of rows to read at any one time. |
See readMM
A sparse matrix object that inherits from the "Matrix" class which the original dimensions.To get the vector of the specified column, one need to subset the matrix to select the column with the same index.
Ruqian Lyu
demo_path <-paste0(system.file("extdata",package = "comapr"),"/")
readColMM(file = paste0(demo_path,"s1_chr1_vi.mtx"), which.col=2,chunk=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.