[R] Convert string for expression in plot

Richard Longland longland at physics.unc.edu
Tue Jan 29 16:26:26 CET 2008


Hi,

Although I understand how to use expression and paste to add
superscripts and symbols to my graphs, I have a problem with adding
superscripts to an existing string.

For example, I read in the following from a separate file:
25Mg(p,g)

I want to convert that to superscripts etc. (in LaTex format):
$^{25}$Mg(p,$\gamma$)

This needs to then be put into a graph title.

Any ideas? I know that I can just write it in using expression and
paste, but the title is read in from a separate file.

Cheers for the help,
Richard longland



More information about the R-help mailing list