[R] plotting mathematical notation and values substitution

Luca Scrucca luca at stat.unipg.it
Mon Apr 4 20:50:43 CEST 2005


Dear R-users,

I'm trying to add a title on a plot with both mathematical notation and
values substitution. I read the documentation and search the mailing list
but I was not able to solve my problem. Actually, there is a message by
Uwe Ligges on June 2003 which addresses a question very close to mine, but
the code provided doesn't work. The code is the following:

# 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?

Thanks in advance for any reply.

Luca Scrucca


+-----------------------------------------------------------------------+
| Dr. Luca Scrucca                                                      |
| Dipartimento di Economia, Finanza e Statistica                        |
| Sezione di Statistica                          tel. +39-075-5855226   |
| Università degli Studi di Perugia              fax. +39-075-5855950   |
| Via Pascoli - C.P. 1315 Succ. 1                                       |
| 06100 PERUGIA  (ITALY)                                                |
|                                                  (o_   (o_   (o_      |
| E-mail:   luca at stat.unipg.it                    //\   //\   //\       |
| Web page: http://www.stat.unipg.it/luca         V_/_  V_/_  V_/_      |
+-----------------------------------------------------------------------+




More information about the R-help mailing list