[R] plotting mathematical notation and values substitution

From: Luca Scrucca <luca_at_stat.unipg.it>
Date: Tue 05 Apr 2005 - 04:50:43 EST


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@stat.unipg.it //\ //\ //\ |
| Web page: http://www.stat.unipg.it/luca V_/_ V_/_ V_/_ |
+-----------------------------------------------------------------------+ ______________________________________________
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.html Received on Mon Apr 04 19:57:21 2005

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