Skip to content
Prev 295001 / 398506 Next

Names of Greek letters stored as character strings; plotmath.

I had such good luck with my previous question to r-help, (a few minutes
ago) that I thought I would try again with the following query:
Then, just before clicking on "Send", I had one more thimk, and blow
me down, I got something that worked:

plot(1:10,xlab=eval(expression(parse(text=xNm))))

This is another counter example to my colleague Thomas Lumley's dictum
expressed in fortune("parse").  :-)

I had to try several permutations of "eval" and "expression" and "parse",
but I finally found that the permutation presented above does what I want.
(Clearly I have no real idea what I'm doing, just hammering and hoping,
but it's amazing how far hammer and hope will get you sometimes with R!)

Just thought I'd post this in case it might be helpful to others.  Also 
to see
if anyone can tell me a better/slicker/sexier way to get to the same result.

     cheers,

             Rolf Turner

Thread (18 messages)

Rolf Turner Names of Greek letters stored as character strings; plotmath. May 18 Gabor Grothendieck Names of Greek letters stored as character strings; plotmath. May 19 Bert Gunter Names of Greek letters stored as character strings; plotmath. May 19 Bert Gunter Names of Greek letters stored as character strings; plotmath. May 19 William Dunlap Names of Greek letters stored as character strings; plotmath. May 19 Paul Johnson Names of Greek letters stored as character strings; plotmath. May 19 Gabor Grothendieck Names of Greek letters stored as character strings; plotmath. May 19 William Dunlap Names of Greek letters stored as character strings; plotmath. May 19 Rolf Turner Names of Greek letters stored as character strings; plotmath. May 19 Robert Baer Names of Greek letters stored as character strings; plotmath. May 20 Rolf Turner Names of Greek letters stored as character strings; plotmath. May 20 Duncan Murdoch Names of Greek letters stored as character strings; plotmath. May 20 Bert Gunter Names of Greek letters stored as character strings; plotmath. May 20 Joshua Wiley Names of Greek letters stored as character strings; plotmath. May 20 Duncan Murdoch Names of Greek letters stored as character strings; plotmath. May 20 Peter Dalgaard Names of Greek letters stored as character strings; plotmath. May 21 William Dunlap Names of Greek letters stored as character strings; plotmath. May 21 Bert Gunter Names of Greek letters stored as character strings; plotmath. May 21