Skip to content
Prev 341328 / 398498 Next

extract a subset of non-contiguous elements of a matrix

This _was_ in the answer you got, but to clarify things, perhaps try this:

(M <- matrix(1:9,3,3))
(ix <- rbind(c(3,2),c(1,3)))
M[3,2]
M[1,3]
M[ix]

-pd
On 19 Jun 2014, at 14:12 , carol white <wht_crl at yahoo.com> wrote: