Skip to content
Prev 33576 / 398506 Next

combining mathematical notation and value substitution

Faheem Mitha wrote:
No, it won't work that way, because you have to specify an S expression 
in order to get mathematical annotation. An expression within paste() 
will be converted to a character string.

What you ca do is the other way round:


t1 <- theta     # you cannot use theta as variable and math. symbol
plot(1:10, main =
   substitute("Monotonic Multigamma run (" * n  == len * ", " *
     theta == t1 * ").", list(len = len, t1 = t1)))


See also ?plotmath or that small article in R News:
Ligges (2002): R Help Desk: Automation of Mathematical Annotation in 
Plots. R News 2(3), 32-34.

Uwe Ligges