Yi Yuan
2013-May-07 20:40 UTC
[R] How to use "SparseM-conversions" to convert a dCgMatrix into a matrix.csr ?
Hi all, I want to transform a dCgMatrix from package Matrix into a matrix.csr from package SparseM, and I found out this link : http://stat.ethz.ch/R-manual/R-devel/library/Matrix/html/SparseM-conv.html But there's no informaion about usage/description/arguments, so how do I use this SparseM-conversions method ?? Is it a function ?? By the way I already tried function: as.spam.matrix.csr from package spam and it didn't work:Error in as.spam.matrix.csr(train.sparse) : Wrong object passed to 'as.spam.matrix.csr'. Don't know why. My dCgMatrix is produced by sparseMatrix( ) fuction from package Matrix and it's class is :> class(train.sparse)[1] "dgCMatrix" attr(,"package") [1] "Matrix" Could anyone help me figure out how to transform train.sparse matrix into a matrix.csr ?? Thanks !! [[alternative HTML version deleted]]