dcSparseMatrix
is supposed to create a sparse matrix for an
input file with three columns.
dcSparseMatrix(input.file, verbose = T)
a list containing arguments and their default values
None
# create a sparse matrix of 4 X 2 input.file <- rbind(c('R1','C1',1), c('R2','C1',1), c('R2','C2',1), c('R3','C2',1), c('R4','C1',1)) res <- dcSparseMatrix(input.file)Load the input data matrix of 5 X 3 ... There are 5 entries, converted into a sparse matrix of 4 X 2.res4 x 2 sparse Matrix of class "dgCMatrix" C1 C2 R1 1 . R2 1 1 R3 . 1 R4 1 .# get a full matrix as.matrix(res)C1 C2 R1 1 0 R2 1 1 R3 0 1 R4 1 0
dcSparseMatrix.r
dcSparseMatrix.Rd
dcSparseMatrix.pdf
dcAlgoPredictMain