Convert index matrix to sparse matrix.
Usage
indx_to_spmat(indx_mat, row_names, col_names)
Arguments
- indx_mat
row-wise index matrix. Usually a kNN graph.
- row_names
the rownames of the resulting sparse matrix.
- col_names
the column names that correspond to the indexes in indx_mat.
Value
a `Matrix::sparseMatrix` object.