Skip to content
Prev 22561 / 398502 Next

Help with improving efficiency

Roger Peng suggests:
[WNV]  Mathematically correct but potentially memory demanding and
slow.  What's wrong with

		m1 <- crossprod(v*W, W)

	or, if you can assume that the elements of v are non-negative:

		m1 <- crossprod(sqrt(v) * W)

	?  I have learnt to be very wary about code that uses expliticly
stored diagonal matrices.

	Bill Venables.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._