I would like to insert a superscript in a body of text (e.g., a title or axis label), where the superscript is not necessarily at the end of the text. For example, suppose a title read, "This is a Test^1 of the Emergency Broadcast System" where there is a superscript 1 after the word Test.

As a starting point for what I'm trying to do, the following shows a superscript:
x=10
plot(x)
text(x=1, y=12, expression("test"^1)

But, the following does not show a superscript:
x=10
plot(x)
text(x=1, y=11, paste("This is a", expression("test"^1), "of the Emergency Broadcast System.")

Thanks in advance to all those who reply.

Best,
Brian Kriegler
bkriegle...@gmail.com
--
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to