An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111111/42450200/attachment.pl>
(no subject)
2 messages · Rui Esteves, jim holtman
Is this possibly FAQ 7.31? Print your matrix with options(digit=20) to see better what the values are. You might also look at 'all.equal'.
On Thu, Nov 10, 2011 at 7:05 PM, Rui Esteves <ruimaximo at gmail.com> wrote:
Hello. I have this matrix: cy ? ? ? ? ? ?[,1] ? ? ? [,2] ? ? ? [,3] ? ? ? [,4] ? ? ? [,5] ? ? ? [,6] ?[1,] ?1.0000000 ?1.0000000 -0.5164570 -0.5164087 -0.4004139 -0.4003719 ?[2,] ?1.0000000 ?1.0000000 -0.5164570 -0.5164087 -0.4004139 -0.4003719 ?[3,] -0.5164570 -0.5164570 ?1.0000000 ?1.0000000 -0.1186691 -0.1186972 ?[4,] -0.5164087 -0.5164087 ?1.0000000 ?1.0000000 -0.1186995 -0.1187276 ?[5,] -0.4004139 -0.4004139 -0.1186691 -0.1186995 ?1.0000000 ?1.0000000 ?[6,] -0.4003719 -0.4003719 -0.1186972 -0.1187276 ?1.0000000 ?1.0000000 ?[7,] -0.4058070 -0.4058070 -0.1150400 -0.1150706 ?0.9999826 ?0.9999824 ?[8,] -0.4061715 -0.4061715 -0.1147942 -0.1148249 ?0.9999802 ?0.9999799 ?[9,] -0.4061804 -0.4061804 -0.1147882 -0.1148189 ?0.9999801 ?0.9999799 [10,] ?1.0000000 ?1.0000000 -0.5164570 -0.5164087 -0.4004139 -0.4003719 ? ? ? ? ? ?[,7] ? ? ? [,8] ? ? ? [,9] ? ? ?[,10] ?[1,] -0.4058070 -0.4061715 -0.4061804 ?1.0000000 ?[2,] -0.4058070 -0.4061715 -0.4061804 ?1.0000000 ?[3,] -0.1150400 -0.1147942 -0.1147882 -0.5164570 ?[4,] -0.1150706 -0.1148249 -0.1148189 -0.5164087 ?[5,] ?0.9999826 ?0.9999802 ?0.9999801 -0.4004139 ?[6,] ?0.9999824 ?0.9999799 ?0.9999799 -0.4003719 ?[7,] ?1.0000000 ?0.9999999 ?0.9999999 -0.4058070 ?[8,] ?0.9999999 ?1.0000000 ?1.0000000 -0.4061715 ?[9,] ?0.9999999 ?1.0000000 ?1.0000000 -0.4061804 [10,] -0.4058070 -0.4061715 -0.4061804 ?1.0000000 I want to know the coordinates of the 1's only in the cy's lower triangle. If I do cy%in%1 or cy ==1 I have this result: ?[1] ?TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ?TRUE ?[13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ?TRUE FALSE ?[25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ?TRUE FALSE FALSE ?[37] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ?TRUE FALSE FALSE FALSE ?[49] FALSE FALSE FALSE FALSE FALSE FALSE FALSE ?TRUE FALSE FALSE FALSE FALSE ?[61] FALSE FALSE FALSE FALSE FALSE FALSE ?TRUE FALSE FALSE FALSE FALSE FALSE ?[73] FALSE FALSE FALSE FALSE FALSE ?TRUE FALSE FALSE FALSE FALSE FALSE FALSE ?[85] FALSE FALSE FALSE FALSE ?TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [97] FALSE FALSE FALSE TRUE ?It seems that is only considering the principal diagonal. I don't understand why... Thank you, Rui ? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it.