[R] Using a list as multidimensional indexer
nick.sabbe at ugent.be
Thu Jan 20 11:04:53 CET 2011
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
This holds, for each dimension, an indexer for that dimension.
Now I would like to get the element pointed at by the list.
The obvious solutions don't seem to work, and I can't seem to get do.call to
call the indexer ('[') on my multidimensional object.
Thanks in advance,
ping: nick.sabbe at ugent.be
wink: A1.056, Coupure Links 653, 9000 Gent
-- Do Not Disapprove
More information about the R-help