From: Rich FitzJohn <rich.fitzjohn_at_gmail.com>

Date: Mon 04 Apr 2005 - 21:11:05 EST

Date: Mon 04 Apr 2005 - 21:11:05 EST

Gidday,

See ?plotmath and demo(plotmath) for lots of information on plotting with mathematical symbols.

This produces what you seem to be after (paste() being the missing
ingredient):

plot(1:10, main=substitute(paste("Monotonic Multigamma run ( *",

list(n==len, theta==t1), " * )"), list(len=len, t1=t1)))

This does seem to be a lot of work just to get a theta symbol, and
this seems just as informative:

plot(1:10, main=paste("Monotonic Multigamma run ( * n =", len,

"theta =", t1, " * )"))

Your second example gives a syntax error for me.

Cheers!

Rich

On Apr 5, 2005 6:50 AM, Luca Scrucca <luca@stat.unipg.it> wrote:

> # I add this to let you run the example by copy and paste

*> > t1 <- 0.5; len <- 1
**> # then
**> > plot(1:10,
**> main = substitute("Monotonic Multigamma run (" * n == len * ", " *
**> theta == t1 * ").", list(len = len, t1 = t1)))
**>
**> but I got the following:
**>
**> Error: syntax error
**>
**> I also tried with just one value substitution:
**>
**> > plot(1:10,
**> main = substitute("Monotonic Multigamma run (" theta == t1 * ").",
**> list(len = len, t1 = t1)))
**>
**> which works fine. How can I have more than one value substitution,
**> together with mathematical notation and text?
*

-- Rich FitzJohn rich.fitzjohn <at> gmail.com | http://homepages.paradise.net.nz/richa183 You are in a maze of twisty little functions, all alike ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.htmlReceived on Mon Apr 04 21:19:10 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:31:01 EST
*