Re: [R] delete a row in a matrix

2007-11-19 Thread Julian Burgos
Something like this? > a=matrix(1:9, ncol=3) > print(a) [,1] [,2] [,3] [1,]147 [2,]258 [3,]369 > a=a[-2,] > print(a) [,1] [,2] [,3] [1,]147 [2,]369 You can use negative numbers to reference rows and/or columns, and you'l

Re: [R] delete a row in a matrix

2007-11-19 Thread Benilton Carvalho
theMatrix = matrix(1:100, nc=5) theMatrixWithoutRow5 = theMatrix[-5,] b On Nov 19, 2007, at 3:35 PM, Barb, Jennifer (NIH/CIT) [E] wrote: > Can anyone tell me how to delete a row in a matrix? I have searched > around and couldn't find a straightforward way to do this. > > Thanks, any help will