Re: [R] Extracting elements from a matrix using a vector containing indices

2013-05-07 Thread David Winsemius
On May 7, 2013, at 11:52 AM, Mark Coletti wrote: > On Tue, May 7, 2013 at 4:53 AM, peter dalgaard wrote: > >> >> On May 7, 2013, at 06:39 , Mark Coletti wrote: >> >>> I have a matrix of data that has a corresponding vector of indices. I >>> would like to use those indices to extract specific

Re: [R] Extracting elements from a matrix using a vector containing indices

2013-05-07 Thread Mark Coletti
On Tue, May 7, 2013 at 4:53 AM, peter dalgaard wrote: > > On May 7, 2013, at 06:39 , Mark Coletti wrote: > > > I have a matrix of data that has a corresponding vector of indices. I > > would like to use those indices to extract specific matrix elements into > a > > new vector. In other words, I

Re: [R] Extracting elements from a matrix using a vector containing indices

2013-05-07 Thread peter dalgaard
On May 7, 2013, at 06:39 , Mark Coletti wrote: > I have a matrix of data that has a corresponding vector of indices. I > would like to use those indices to extract specific matrix elements into a > new vector. In other words, I have an R X C matrix with a corresponding > vector of C elements th

Re: [R] Extracting elements from a matrix using a vector containing indices

2013-05-06 Thread Berend Hasselman
On 07-05-2013, at 06:39, Mark Coletti wrote: > I have a matrix of data that has a corresponding vector of indices. I > would like to use those indices to extract specific matrix elements into a > new vector. In other words, I have an R X C matrix with a corresponding > vector of C elements tha

[R] Extracting elements from a matrix using a vector containing indices

2013-05-06 Thread Mark Coletti
I have a matrix of data that has a corresponding vector of indices. I would like to use those indices to extract specific matrix elements into a new vector. In other words, I have an R X C matrix with a corresponding vector of C elements that have numbers mapping into specific elements of the mat