4

How can two expressions (expr and alpha~"is in ") be combined so that they are shown as one expression (in a plot label or via mtext() or so)?

expr <- expression(bgroup("(",frac(1,3)*", "*frac(1,2),")")) 
plot(0, 0, xlab = expression(c(alpha~"is in ", expr)), ylab = "") 

This seems to be related, but I didn't find it helpful for this particular question.

Marius Hofert
  • 6,546
  • 10
  • 48
  • 102

1 Answers1

4

... found an answer (thanks to a previous post which was deleted):

expr <- bquote(bgroup("(",frac(1,3)*", "*frac(1,2),")")) 
plot(0, 0, xlab = bquote(alpha~"is in "~.(expr)), ylab = "")
Marius Hofert
  • 6,546
  • 10
  • 48
  • 102