I have to admit that I find the plotmath expressions in R a little fiddly to annotate plots with mathematical notation. Apparently I am not the only one, but Stefano Meschiari did actually something about it. A few days ago his package latex2exp appeared on CRAN. The package provides the wonderful function latex2exp that translates LaTeX code into plotmath expressions. Brillant! All I have to remember is to escape the “” character, that is write “\“ instead of “”.

This is a personal weblog. All data and information provided on this site
is for informational purposes only.

The opinions expressed here represent
my own - some of them change over time.

© Markus Gesmann CC BY-NC-SA 3.0 ·
Powered by the Academic
theme for Hugo.