Re: [R] Superscript in graph text

2017-01-18 Thread Jake William Andrae
: Jake William Andrae Subject: Re: [R] Superscript in graph text your example is not reproducible because I don't have your dataset. Please re-read the notes at the bottom of every R-help email PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide comme

Re: [R] Superscript in graph text

2017-01-18 Thread Richard M. Heiberger
x <- 10 plot(1:10, main=bquote(R^2 * "=" * .(x))) On Wed, Jan 18, 2017 at 8:00 PM, Richard M. Heiberger wrote: > ?plotmath > > > plot(1:10, main=expression(R^2)) > > plot(1:10, main=bquote(R^2 * "=" * .(x))) > > On Wed, Jan 18, 2017 at 7:44 PM, Jake William Andrae > wrote: >> Hello, >> >> >> I'v

Re: [R] Superscript in graph text

2017-01-18 Thread Richard M. Heiberger
?plotmath plot(1:10, main=expression(R^2)) plot(1:10, main=bquote(R^2 * "=" * .(x))) On Wed, Jan 18, 2017 at 7:44 PM, Jake William Andrae wrote: > Hello, > > > I've added some statistical information as text to some graphs, but I'm > having a really hard time making the 2 in the R2 label supe

Re: [R] Superscript in graph text

2017-01-18 Thread Bert Gunter
?plotmath Yes, you will have to put in some effort if you want to use these sorts of latex-like math expressions as labels in your graphs. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathe

[R] Superscript in graph text

2017-01-18 Thread Jake William Andrae
Hello, I've added some statistical information as text to some graphs, but I'm having a really hard time making the 2 in the R2 label superscript. Does anyone have any suggestions? mtext(paste("R2 = ", R2), adj=0, line=1, col="black", cex=0.7) Kind regards Jake Andrae PhD Candidate Geolog