Re: [R] is this matrix symmetric

2010-11-07 Thread Jorge Ivan Velez
Hi Jun, Just remove the col.names: colnames(x) <- NULL isSymmetric(x) [1] TRUE HTH, Jorge On Sun, Nov 7, 2010 at 1:21 AM, Jun Shen <> wrote: > Hi, > > I have this symmetric matrix, at least I think so. > > col1 col2 col3 > [1,] 0.20 0.05 0.06 > [2,] 0.05 0.10 0.03 > [3,] 0.06 0.03 0.08

Re: [R] is this matrix symmetric

2010-11-07 Thread P Ehlers
Jun Shen wrote: Hi, I have this symmetric matrix, at least I think so. col1 col2 col3 [1,] 0.20 0.05 0.06 [2,] 0.05 0.10 0.03 [3,] 0.06 0.03 0.08 or structure(c(0.2, 0.05, 0.06, 0.05, 0.1, 0.03, 0.06, 0.03, 0.08 ), .Dim = c(3L, 3L), .Dimnames = list(NULL, c("var1", "var2", "var3"))) B

[R] is this matrix symmetric

2010-11-06 Thread Jun Shen
Hi, I have this symmetric matrix, at least I think so. col1 col2 col3 [1,] 0.20 0.05 0.06 [2,] 0.05 0.10 0.03 [3,] 0.06 0.03 0.08 or structure(c(0.2, 0.05, 0.06, 0.05, 0.1, 0.03, 0.06, 0.03, 0.08 ), .Dim = c(3L, 3L), .Dimnames = list(NULL, c("var1", "var2", "var3"))) But isSymmetric() d