Skip to content
Prev 295085 / 398506 Next

removeing only rows/columns with "na" value from square ( symmetrical ) matrix.

On Sun, May 20, 2012 at 10:17 AM, Nevil Amos <nevil.amos at monash.edu> wrote:
Try this:

ix <- na.action(na.omit(replace(M, upper.tri(M), 0)))
M[-ix, -ix]