You can incorporate very nice looking mathematical formulas in R Markdown fairly easily. The system relies on LaTeX for displaying formulas and is surprisingly easy to learn. But every once in a while you want to do something a bit exotic, like placing a “hat” in your equation. I’ve typically just done a quick Google search on something like “LaTeX hat symbol” and each different search yields a different website. Recently, I stumbled up a fairly comprehensive guide to displaying mathematical formulas in LaTex. It is published as an eBook.

Note: Some of the examples require additional libraries like amsmath and I haven’t figured out yet how to take advantage of these libraries in R Markdown.

Wikibooks. LaTeX/Mathematics. Available in html format.