I am trying to get the following line in a plot margin using mtext:

100% Area = 120.000 km^2

Where I intend that "100% Area =" is text, 120.000 is a number that varies
according to different data, and km^2 should be a neat
km-with-superscript-2. 
The expression function fails me, since it apparently cannot coerce an
expression when a variable is involved. 
In the R help file there is an example using either bquote or substitute to
accomplish like things, but these are sufficiently different from my
objective and I am becoming more and more confused by every further example
I stumble on. 
This should be easy. Can anyone help me prevent spending anoter 2.5 hours on
the matter? Thanks.
-- 
View this message in context: 
http://www.nabble.com/Combining-math-and-variables-in-expression-tp22455877p22455877.html
Sent from the R help mailing list archive at Nabble.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