Convert a sparse matrix to a full matrix - R -


i looking efficient way convert huge sparse matrix full matrix (not dataframe) in r?

any idea?

thanks.

we can use as.matrix

m1 <- as.matrix(sm) 

where sm sparse matrix.

we can check methods

grep("as.matrix", methods(class = "sparsematrix"), value = true) #[1] "as.matrix,matrix-method" 

Comments