Re: [R] Copying rows from a matrix using a vector of indices

2005-08-23 Thread Spencer Graves
I don't quite understand what you are asking. Have you checked the sections on Simple manipulations numbers and vectors, Arrays and matrices, and Lists and data frames in the manual An Introduction to R? If you still would like some help after this, PLEASE do read the posting

[R] Copying rows from a matrix using a vector of indices

2005-08-17 Thread Martin Lam
Hi, I am trying to use a vector of indices to select some rows from a matrix. But before I can do that I somehow need to convert 'combinations' into a list, since 'mode(combinations)' says it's 'numerical'. Any idea how I can do that? library(combinat) combinations - t(combn(8,2)) indices -

Re: [R] Copying rows from a matrix using a vector of indices

2005-08-17 Thread Marc Schwartz (via MN)
On Wed, 2005-08-17 at 12:02 -0700, Martin Lam wrote: Hi, I am trying to use a vector of indices to select some rows from a matrix. But before I can do that I somehow need to convert 'combinations' into a list, since 'mode(combinations)' says it's 'numerical'. Any idea how I can do that?