[R] Re: combining mathematical notation and value substitution

Faheem Mitha faheem at email.unc.edu
Fri Jun 20 09:10:18 CEST 2003



On Fri, 20 Jun 2003, Faheem Mitha wrote:

>
> Dear People,
>
> I need to make a label which both contains math notation as well as
> substitutes a value for an object. In the following label, len and theta
> are one dim variables, and I am substituting their values appropriately.
> This label looks fine except that I want the greek symbol for theta to
> appear instead of the word `theta'. How can I do so most easily?
[snip]

> main=paste("Monotonic Multigamma run (n=",
> deparse(substitute(len)),", ",
> expression(theta),"=", deparse(substitute(theta)),").")

Hmm. Tried this, didn't work either. Inspired by pg 32 of "R for
Beginners".

 main=paste("Monotonic Multigamma run",
           as.expression(substitute(n==length,list(length=len))),
           as.expression(substitute(theta==th,list(th=theta))))

                                            Faheem.




More information about the R-help mailing list