library(knitr)
For more information see the accessr site on GitHub
- Bullet 1
- Bullet 2
11 April, 2024
library(knitr)
For more information see the accessr site on GitHub
\[ \begin{eqnarray} T = \left\{\begin{array}{ll} \overline{X} & \mbox{ with probability } 1 - 1/n \,, \\ \overline{X} + n & \mbox{ with probability } 1/n \,. \\ \end{array}\right. \end{eqnarray} \]
\[ \begin{aligned} P(X \leq x) &= P(F^{-1}(U) \leq x) \\ &= P(F(F^{-1}(U)) \leq F(x)) \\ &= P(U \leq F(x)) = F(x). \end{aligned} \]
Tips (prompted by issues when creating Word output):
$$ ... $$
. Otherwise, the maths is ignored.\text{}
or \mbox{}
for text in an maths environment. (\rm{}
causes problems.)plot(1:10, 1:10, pch = 1:10, xlab = "x", ylab = "y")
Use knitr chunk options fig.alt (alternative text) and fig.cap (caption).
include_graphics(system.file(package = "accessr", "examples", "plot.png"))
Use knitr::include_graphics().
The table will only appear if both of the packages dplyr
or huxtable
are installed. The huxtable
code is hidden because it is lengthy. Of course, there are many other ways to create tables in R markdown.
clinic | drug | success (S) | failure (F) |
---|---|---|---|
1 | A | 36 | 24 |
B | 24 | 16 | |
2 | A | 4 | 16 |
B | 16 | 64 |
echo
Setting params$hide = TRUE
can be used to hide content
eval
The figure is missing because params$hide = TRUE
plot(1:10, 1:10, pch = 1:10, xlab = "x", ylab = "y")