[R] legend(1,1,expression(a<-"10^-6"))

Viet Nguyen vietnguyen at fastmail.fm
Tue Apr 27 08:44:30 CEST 2004

hi all,

I have a problem with showing properly formated mathematical expressions 
in a plot.

The following works:

legend(1,10, expression(10^-6))

Howver, if my expression is kept in a char variable, I don't know how to 
show it in the legend.

# I have
# I try to do this
legend(1,10, expression(st))
# which doesn't turn out as expected

Is it possible to convert a string into expression? Or is there a 
different way of doing what I want to do?

Thanks in advance for your help.

More information about the R-help mailing list