Notebooks with RMarkdown

Video recording for this session




This week, we revisit creating and maintaining online notebooks using RMarkdown. Two weeks ago, we worked with plain Markdown to create an example notebook. The process with RMarkdown is largely similar, but this format offers greater functionality and less typing.



Table of Contents




































1. Software Install

We will be using RStudio to create a RMarkdown document. But before we can do so, we will need to install following software:


1.1 Install RMarkdown

install.packages("rmarkdown")
library(devtools)

devtools::install_github("rstudio/rmarkdown")


1.2 Install TinyTeX

RMarkdown is able to produce LaTeX formatted output (.tex format) but it requires TinyTeX a very small and easy to maintain TeX distribution. Installation is straightforward:

install.packages("tinytex")

library(tinytex)

tinytex::install_tinytex()



2. Data for today’s exercise

This exercise uses a population genomic data set from study of two hybridizing Populus species. One of the goals of this study was to uncover signatures of natural selection (sensu Darwin) in hybrid individuals. In order to do this, a genetic differentiation index called Fst is calculated between populations for two sets of genetic loci: those that have been determined to be under the effect of natural selection and those that are presumed neutral (i.e. no selection). We will be making a couple of figures from this data.



3. Further Reading