Nikola testdrive

Let's put reST through the paces -- to see how the features work. I want to do the following:

  • bold, italic, ~~strikethrough~~ (not yet)

  • Use math: \(E=mc^2\)

  • Use hyperlink: CDC.

  • Use cross-refference Research

  • Insert picture

  • Insert code from file

  • Use directives

/files/Example_Figure.png
library(tidyverse)
#Example Figure

rate <- .5
df <- tibble(decay = rexp(100, rate))

p1 <- ggplot(df, aes(x = decay)) +
  geom_histogram(breaks = 0:8) +
  scale_x_continuous(breaks = 0:8) +
  geom_function(fun = rlang::as_function(~ 100 * dexp(.x, rate)), color = "red") +
  labs(x = "", y = "") +
  theme_bw()

ggsave("Example_Figure.png", p1)

Note

The image directive requires the left-most / in its path, while the include directive can not have the left-most / in the path

Note

reST's include directive allows us to include a file. However, a link ln path/to/source.R removes redundancy.