LaTeX2Exp — transform LaTeX strings into R expressions

latex2exp is a new R package that parses and converts LaTeX math formulas into R’s plotmath expressions. Plotmath expressions are used to enter mathematical formulas and symbols to be rendered as text, axis labels, etc. throughout R’s plotting system. I find plotmath expressions to be quite opaque and fiddly; LaTeX is a de-facto standard for mathematical expressions, so this package might be useful to others as well. You can check it out on GitHub.



“Supported” LaTeX

Only a subset of LaTeX is supported, and not 100% correctly. Greek symbols (\alpha, \beta, etc.) and the usual operators (+, -, etc.) are supported. Additionally, the following symbols and operators should be supported: