# NOT RUN {
# 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',2), c('R4','C1',1))
data <- xSparseMatrix(input.file)
# convert into a data frame
res_df <- xSM2DF(data)
res_df
# }
Run the code above in your browser using DataLab