Skip to content
Prev 10169 / 398503 Next

outer

On Thursday 15 March 2001 18:11, Olivier Martin wrote:

            
r-plus? That's new! :-)
you would have to change the if() clause: x and y are your data, not indices.

Try this:

m <- outer(x,y,FUN="+")
m[lower.tri(m, diag=T)] <- 0

Cheers

Kaspar