Re: [R] manipulating a matrix

2010-05-12 Thread David Winsemius
On May 12, 2010, at 3:14 PM, Clark Johnston wrote: Is there a way to create a new matrix from and existing matrix with A [,1] [,2] [1,] 113 [2.] 218 [3,] 314 [4,] 420 if() B [,1] [,2] [1,] 2 18 [2,] 4 20

Re: [R] manipulating a matrix

2010-05-12 Thread Erik Iverson
Clark Johnston wrote: Is there a way to create a new matrix from and existing matrix with A [,1] [,2] [1,] 113 [2.] 218 [3,] 314 [4,] 420 if(A[,2] > 15) B [,1] [,2] [1,] 2 18 [2,] 4 20 It's

Re: [R] manipulating a matrix

2010-05-12 Thread Henrique Dallazuanna
Try: A[A[,2] > 15,] On Wed, May 12, 2010 at 4:14 PM, Clark Johnston wrote: > > Is there a way to create a new matrix from and existing matrix with > > A > [,1] [,2] > [1,] 113 > [2.] 218 > [3,] 314 > [4,] 420 > > if(A[,2] > 15) > >

[R] manipulating a matrix

2010-05-12 Thread Clark Johnston
Is there a way to create a new matrix from and existing matrix with A [,1] [,2] [1,] 113 [2.] 218 [3,] 314 [4,] 420 if(A[,2] > 15) B [,1] [,2] [1,] 2 18 [2,] 4 20 -- View this message in context: