[R] italics letter in roman string

Chabot Denis chabotd at globetrotter.net
Sun Mar 18 03:01:24 CET 2007


Hi,

As part of the legend to a plot, I need to have the "n" in italics  
because it is a requirement of the journal I aim to publish in:
"This study, n = 3293"

Presently I have:
legend(20, 105, "This study, n = 3293", pch=1,  col=rgb(0,0,0,0.5),
                 pt.cex=0.3, cex=0.8, bty="n")

I suppose I could leave a blank in place of the "n", then issue a  
text call where I'd use font=3 for a single letter, "n". But it will  
be tricky to find the exact location to use.

Is there a way to switch to font=3 just for one letter within a string?

Thanks in advance,

Denis Chabot



More information about the R-help mailing list