$$
r = \frac{1}{n-1} \sum_{i=1}^{n} \frac{(X_i - \bar{X})(Y_i - \bar{Y})}{S_xS_y}
$$
The rendered equation is not numbered. Using \begin{aligned} and \end{aligned} generates an error.
I am also using knitr in RStudio, knitting to PDF using pandoc and xelatex engine.
Thank you.
As pointed out amsmath
is already in the default template, so you can invoke the equation
environment
\begin{equation}
y = mx+b
\end{equation}
This will automatically number equations in order of use. To use another character, say *,
\begin{equation}
\tag{*}
y = ax^2 + bx + c
\end{equation}
To leave equation unmarked simply leave tag{}
blank.
For differences between align
and equation
see this answer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With