[R] Odp: accessing dimension names
petr.pikal at precheza.cz
Tue Dec 18 13:26:19 CET 2007
r-help-bounces at r-project.org napsal dne 18.12.2007 12:01:41:
> I have a matrix y:
> > dimnames(y)
>  "1" "2"
>  "0" "1" "2"
> .................. so on (there are other dimensions as well)
> I need to access a particular dimension, but a random mechanism tells me
> which dimension it would. So, sometimes I might need to access
> dimnames(y)$x93, some other time it would be dimnames(y)$x94.. and so
> Now let that random dimension be idx, then
> doesn't work.
> Can anyone help?
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help