[R] Adding Latex to text

Rolf Turner rolf.turner at xtra.co.nz
Thu Feb 7 01:53:54 CET 2013


Perhaps you want to look at

     ?plotmath

     cheers,

         Rolf Turner

On 02/07/2013 11:41 AM, David Arnold wrote:
> Hi,
>
> I'd like to add "alpha" in latex code to my image. Any suggestions?
>
> library(UsingR)
> BagA = c(rep(10,6),rep(20,5), rep(30,4),rep(40,3),rep(50,2),60,70)
> BagA
> BagB = c(10, 20,rep(30,2),rep(40,3),rep(50,4),rep(60,5),rep(70,6))
> BagB
>
> par(mfrow = c(2, 1))
> DOTplot(BagA)
> abline(v=60,lwd=2,lty=2,col="red")
> text(65,3, "alpha-->", col=2)
> abline(v=50, lwd=2, lty=2, col="blue")
> text(57,5, "p-value------->", col="blue")
> DOTplot(BagB)
> abline(v=60,lwd=2,lty=2,col="red")
> text(55,3, "<--beta", col=2)
> par(mfrow = c(1, 1))



More information about the R-help mailing list