6  Workflow

Here’s a possibly useful resource:

https://zsmith27.github.io/rmarkdown_crash-course/lesson-5-code-chunks-and-inline-code.html

Package dependencies

There are many R packages that make writing documents like this especially easy. These must be installed in your system.

install.packages("tidyverse")

R Markdown conventions

bookdown

  • To omit the automatic numbering, add {-} to the end of the line for each header–e.g., lines that start with one or more hash # characters.
# Top-level header without numbers {-}

## Second-level header without numbers {-}

knitr

Inserting images

To insert an image, you will need to insert an R code chunk (opt+command+I on MacOS; alt+ctrl+I on Windows).

`r ''````{r, out.width="100%", fig.align="center", fig.cap="This is a great figure from Seisler et al. 2023."}
knitr::insert_graphics("path/to/img_file")
```