Am I looking for an efficient way to convert a huge sparse matrix into a full matrix (and not a data frame) in R?
Any idea?
Thank.
We can use as.matrix
as.matrix
m1 <- as.matrix(sM)
where sMis the sparse matrix.
sM
We can check methods
methods
grep("as.matrix", methods(class = "sparseMatrix"), value = TRUE) #[1] "as.matrix,Matrix-method"