Skip to content
Prev 106430 / 398513 Next

How to use strings from a data.frame as the argument of an expression() for plot

Try this:


e <- expression(O[3], NO, NO[2])
opar <- par(mfrow = c(2,2))
for(i in 1:3) plot(1, 1, type = "b", main = bquote(.(e[[i]]) ~ Year ~ 2005))
par(opar)

Also please read the last line to every post to r-help and particularly note
the part about reproducible examples.   x and y.were undefined.
On 12/20/06, MrJ Man <auxsvr at yahoo.com> wrote: