Skip to content
Prev 33116 / 398506 Next

Loops question

Ramzi Feghali wrote:

            
Whom is this mail adressed to? The mailing list R-help or Professor Ripley?
So you are going to optimize the following code?
There seems to be a logical n x m matrix called bin.
And the sollution of your problem should be solved within seconds by

  bin %*% t(bin)

where the upper triangular matrix of the result consists of the results 
for all i and k in your loops.

Uwe Ligges