I am familiar with using expression()
and bquote()
when plotting special Tex like markup in textual base graphics in R. But how to do "approximately equal to" without having the parser throw an error. I am referring to ?plotmath
when determining the markup.
plot(c(1,100), c(1,100), type="n", axes=FALSE, xlab="", ylab="")
# This works
text(50, 80, expression(paste("The area is 24 ", km^2)))
# This doesn't
text(50, 50, expression(paste("Reginald is ", %~~% , "14 years old")))