Skip to content
Prev 87723 / 398500 Next

how to make plotmath expression work together with paste

Try bquote (I may not have followed precisely what you
want but hopefully this gives the idea).  Note that you
may need to use a few judiciously placed ~ and
phantom(), as shown, in order to maintain syntax:

plot(NA, xlim = c(0, 100), ylim = c(0, 100))

avar1 <- 10
amath1 <- bquote(slope == frac(partialdiff * f(hat(theta)),
	partialdiff * hat(theta)) ~ phantom() == .(avar1))
text(10, 60, amath1)
text(20,30, bquote(a ~ word ~ .(avar1) ~ partialdiff ))
tetext(50,80, bquote(slope == frac(partialdiff *
                f(hat(theta)), partialdiff * hat(theta)) ~ .(avar1)))
n <- 12
text(12, 15, labels = bquote(bar(x) == sum(frac(x[i], .(n)), i==1) ~
	gamma == .(avar1)), cex = 0.8)
On 3/5/06, Paul Johnson <pauljohn32 at gmail.com> wrote: