[R] Math Expression and Variable Value in Title

Martin Maechler maechler at stat.math.ethz.ch
Thu Jan 29 09:15:07 CET 2004


>>>>> "Roger" == Roger D Peng <rpeng at jhsph.edu>
>>>>>     on Wed, 28 Jan 2004 19:35:28 -0500 writes:

    Roger> Use substitute()
Yes!

    Roger> n <- 20
    Roger> plot(0, 0, main = substitute(paste(n[i], " = ", k), list(k = n)))

but even better is

           plot(0, 0, main = substitute(n[i] == k, list(k = n)))

(note the "==" !)

Martin




More information about the R-help mailing list