[R] How to convert array dim names to expressions for plotting?

2012-10-04 Thread Hofert Jan Marius
Hi, I would like to use the dim names of an array as labels in a plot. In the case of character labels, this is no problem. However, if I would like to pass expressions through array dim names, they only appear as character labels in the plot and are not evaluated as expressions (see the

Re: [R] How to convert array dim names to expressions for plotting?

2012-10-04 Thread Bert Gunter
It is not clear to me what you mean by expressions in this context. Dimension names but be character strings -- see ?dimnames, which says: The dimnames of a matrix or array can be NULL or a list of the same length as dim(x). If a list, its components are either NULL or a character vector with

Re: [R] How to convert array dim names to expressions for plotting?

2012-10-04 Thread Hofert Jan Marius
Dear Bert, thanks, I was confused (of course). So the right question would have been: How to convert strings to expressions (plotmath expressions). But that I could easily find, thanks. Cheers, Marius Here is the working example (showing plotmath and just-character labels): require(grid)