Subscripts in plots in R

jeffrey picture jeffrey · Apr 14, 2012 · Viewed 186.6k times · Source

I can't find a way how to write subscripts in the title or the subtitle in R. How can I write v 1,2 with 1,2 as subscripts?

Thanks for your help!

Answer

smu picture smu · Apr 14, 2012

expression is your friend:

plot(1,1, main=expression('title'^2))  #superscript
plot(1,1, main=expression('title'[2])) #subscript