Skip to content
Prev 379849 / 398500 Next

Pasting R code lines into labels

... and if you wanted too streamline the process, something like the
following could be encapsulated in a function:

fun <- quote(exp(x))
z <- 1:9
y <- eval(fun,list(x = z) )
plot(x, y, main = paste("Plot of y =", deparse(fun)))

Further details can be found in the "Computing on the Language" section of
the "R Language Reference" manual or from suitable tutorials on the web.

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Thu, Jun 6, 2019 at 8:55 AM Nick Wray via R-help <r-help at r-project.org>
wrote: