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

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -