Re: [R] Converting indices of a matrix subset

2009-07-09 Thread Nathan S. Watson-Haigh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Steven, This looks great. Thanks! Nathan Steve Lianoglou wrote: > Hi Nathan, > > On Jul 8, 2009, at 10:20 PM, Nathan S. Watson-Haigh wrote: > >> I have two matrices: >> >>> m1 <- matrix(1,4,4) >>> m1 >> [,1] [,2] [,3] [,4] >> [1,]1

Re: [R] Converting indices of a matrix subset

2009-07-09 Thread Steve Lianoglou
Hi Nathan, On Jul 8, 2009, at 10:20 PM, Nathan S. Watson-Haigh wrote: I have two matrices: m1 <- matrix(1,4,4) m1 [,1] [,2] [,3] [,4] [1,]1111 [2,]1111 [3,]1111 [4,]1111 m2 <- matrix(0,3,3) diag(m2) <- 1 m2 [,1] [,2]

[R] Converting indices of a matrix subset

2009-07-08 Thread Nathan S. Watson-Haigh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have two matrices: > m1 <- matrix(1,4,4) > m1 [,1] [,2] [,3] [,4] [1,]1111 [2,]1111 [3,]1111 [4,]1111 > m2 <- matrix(0,3,3) > diag(m2) <- 1 > m2 [,1] [,2] [,3] [1,]10