> On 13 Jan 2016, at 02:50, tomdhar...@gmail.com wrote:
> 
> So my question is: How can the rows of a large sparse matrix be
> efficiently scaled?

If you're not picky about the particular storage format, the "wordspace" package

        http://wordspace.r-forge.r-project.org/

has an efficient scaleMargins() function, which can be made to do what you need 
in combination with rowNorms() and colNorms(); cf. the trivial implementation 
of normalize.rows().

These functions only work with a dgCMatrix and will try to coerce any other 
sparseMatrix to this format.

Best,
Stefan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to