[R] Two math expressions in plot

Giovanni Petris GPetris at uark.edu
Thu Oct 9 18:22:27 CEST 2008


Hello!

I am trying to put two math expressions in the title of a plot.  As
you can see below, I can place correctly one expression at a time, but
not both. Ideally I would like to have them separated by a comma. Any
suggestions? 

> k <- 1
> n.eff <- c(20, 30)
> ### this works
> plot(0,0, main = substitute(n == k, list(k = k)))
> ### this works
> plot(0,0, main = substitute(N[eff] == neff, list(neff = n.eff[k])))
> ### this doesn't work
> plot(0,0, main = substitute(n == k * N[eff] == neff, list(k = k, neff = n.eff[k])))

Thanks in advance,
Giovanni

-- 

Giovanni Petris  <GPetris at uark.edu>
Associate Professor
Department of Mathematical Sciences
University of Arkansas - Fayetteville, AR 72701
Ph: (479) 575-6324, 575-8630 (fax)
http://definetti.uark.edu/~gpetris/



More information about the R-help mailing list