Hm. I got somewhat further:
Ind2<-list(Mm,"b","g")
do.call("[",Ind2)
Seems to work.
However, now I need it one step beyond: in fact, my actual multidimensional
object holds one dimension more than my list holds indexes.
i.e.: I want the equivalent of Mm["a",].
I tried some variants of
Ind3<-list
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
2 matches
Mail list logo