Skip to content
Prev 58499 / 398502 Next

sub- and superscript in plot labels

Prof Brian Ripley wrote:
Many thanks to Brian Ripley and Bendix Carstensen for your replies.

Both of the above options produce what I was after. One quick follow-up 
question regarding the use of phantom(). Looking at ?plotmath phantom 
leaves space for a character passed as an argument to phantom(), but 
does not plot it.

In the example above we are leaving space for "nothing". I don't 
understand why this is a valid R expression. I guess phantom() is 
returning something that makes 2-<returned_val> a valid expression, but 
I couldn't find the help for ?phantom so I couldn't check on this in the 
documentation.

Also as an aside, phantom() appears, visually, to be a function, but it 
is not visible to the user as a function. i.e. typing phantom at the 
prompt yields: Error: Object "phantom" not found. getAnywhere(phantom) 
yields nothing either. What is phantom() in R parlance?

All the best,

Gavin