[R] Using a list as multidimensional indexer

2011-01-20 Thread Nick Sabbe
Hello list. Another 'puzzle' for which I don't have a clean solution. Say I have a multidimensional object, e.g.: Mm-matrix(1:6, nrow=2, dimnames=list(c(a,b), c(g,h,i))) And on the other hand I have a list Ind-list(b,g) This holds, for each dimension, an indexer for that dimension. Now I would

Re: [R] Using a list as multidimensional indexer

2011-01-20 Thread Prof Brian Ripley
On Thu, 20 Jan 2011, Nick Sabbe wrote: Hello list. Another 'puzzle' for which I don't have a clean solution. Say I have a multidimensional object, e.g.: Mm-matrix(1:6, nrow=2, dimnames=list(c(a,b), c(g,h,i))) And on the other hand I have a list Ind-list(b,g) This holds, for each dimension, an

Re: [R] Using a list as multidimensional indexer

2011-01-20 Thread Nick Sabbe
/264.59.36 -- Do Not Disapprove -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Nick Sabbe Sent: donderdag 20 januari 2011 11:05 To: r-help@r-project.org Subject: [R] Using a list as multidimensional indexer Hello list. Another 'puzzle