[R] is this matrix symmetric
P Ehlers
ehlers at ucalgary.ca
Sun Nov 7 08:21:52 CET 2010
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")))
>
> But isSymmetric() doesn't agree. Any comment? I am on R 2.10.1 Thanks.
>
> Jun
>
Did you check the help page? See under Details about
rownames and colnames.
-Peter Ehlers
More information about the R-help
mailing list