For those of you who wish to spruce up your RMarkdown with Greek letters and math symbols…
The code used to introduce Greel letters and math symbols in RMarkdown ar derived from LaTeX, a document preparation system for high-quality typesetting. The WikiBooks site, LaTeX/Mathematics provides a large set of commands for rendering Greek letters and math symbols in R.
RMarkdown code enclosed with single dollar signs.
Greek letters alpha and mu:
alpha, the symbol used for the value of Type 1 error is \(\alpha\).
mu, the symbol used for the population mean is \(\mu\).
Superscripts and subscripts:
\(X_{i,j}\)
\(b_{i,j}\)
\(X^2_{i,j}\)
\(b^2_{i,j}\)
Some combinations:
\(\mu_{concentrator}\) = \(\mu_{non-concentrator}\)
\(\alpha\) = 0.05
\(\mu_{male} - \mu_{female} = 0\)
RMarkdown code enclosed with double dollar signs.
\[\mu_{concentrator} = \mu_{non-concentrator}\]
\[\mu_{male} - \mu_{female} = 0\]
Self-sizing parentheses: \(\sum_{i=1}^{n}\left( \frac{X_i}{Y_i} \right)\)
Special symbols: \(a \pm b\), \(x \ge 15\)
Fractions: \(\frac{4z^3}{16}\)
Square roots: \(\sqrt{b^2 - 4ac}\)
Summation notation: First, inline - \(\sum_{i=1}^{n}\left( \frac{X_i}{Y_i} \right)\). Then, as display - \[\sum_{i=1}^{n}\left( \frac{X_i}{Y_i} \right)\]
Bracketed matrices: \[\mathbf{X} = \left[\begin{array} {rrr} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{array}\right] \]