library(tidyverse)
Rmarkdown example
Rmarkdown example
overview
đź•° Time Estimation: X minutes
đź’¬ Learning Objectives:
- First item
- Second item
This is an example of how to make md pages from rmarkdown documents. The source code to generate this md document is in develop/rmd/rmarkdown_example.Rmd
.
First we need to write the document as usual. Try to use the admonitions as in previous examples. Citations are like this (Garcia et al. 2020).
Writing code
You can run code as usual in Rmarkdown. The chunk options can be very useful. By default, the code will not run unless explicity specified in the chunk (you can change this behaviour on the “knitr” chunk above).
ggplot(data = txhousing, aes(x = sales, y = listings)) +
geom_point()
Adding images
You can add images using the knitr::include_graphics()
option.
::include_graphics("../img/logo.png") knitr
References
Garcia, Leyla, Bérénice Batut, Melissa L. Burke, Mateusz Kuzak, Fotis Psomopoulos, Ricardo Arcila, Teresa K. Attwood, et al. 2020. “Ten simple rules for making training materials FAIR.” PLoS Computational Biology 16 (5): 1–9. https://doi.org/10.1371/journal.pcbi.1007854.