- 1. [S] Loop avoiding (score: 1)
- Author: Marcel Wolbers <wolbers@stat.math.ethz.ch>
- Date: Wed, 29 Jul 1998 21:04:11 +0200
- Dear S-users I have a n*m matrix A and a m*n matrix B where n is large (say 10000). The measure I'm interested in is However the calculation above takes too long, has to calculate many things I don't
- /archives/html/s-news/1998-07/msg00204.html (7,346 bytes)
- 2. Re: [S] Loop avoiding (score: 1)
- Author: Franz-Josef Mueter <mueter@ims.uaf.edu>
- Date: Wed, 29 Jul 1998 11:38:52 -0800 (AKDT)
- How about: or better yet (much faster than apply): where: function(M) { nc <- ncol(M) c(M %*% array(1, c(nc, 1))) } The latter resulted in the following times on Version 3.3 Release 1 for Sun SPARC,
- /archives/html/s-news/1998-07/msg00206.html (9,887 bytes)
This search system is powered by
Namazu