Re: [R] single row/column-indexing on matrices

2009-07-24 Thread Murat Tasan
awesome! thanks much! On Jul 24, 6:41 pm, Duncan Murdoch wrote: > On 24/07/2009 6:34 PM, Murat Tasan wrote: > > > > > > > hi all - quick question: > > > i have a matrix m, say nrow=5, ncol=4. > > in a function i'd like to retrieve certain rows or columns from m, but > > which rows/cols are not k

Re: [R] single row/column-indexing on matrices

2009-07-24 Thread Duncan Murdoch
On 24/07/2009 6:34 PM, Murat Tasan wrote: hi all - quick question: i have a matrix m, say nrow=5, ncol=4. in a function i'd like to retrieve certain rows or columns from m, but which rows/cols are not known ahead of time. the function should return a sub-matrix (i.e. still of class 'matrix'). w

[R] single row/column-indexing on matrices

2009-07-24 Thread Murat Tasan
hi all - quick question: i have a matrix m, say nrow=5, ncol=4. in a function i'd like to retrieve certain rows or columns from m, but which rows/cols are not known ahead of time. the function should return a sub-matrix (i.e. still of class 'matrix'). when selecting a single column (or row), the