Reproducibility using R

/ [lectures]   / #rmarkdown #data science #reproducibility 

Beyond the availability of data and methods, reproducible science requires the traceability of analyses. Whether it is for yourself or for collaborators, as series of tools and good practices can facilitate your work flow, simplify analyses, and prevent the loss of data and results. This lecture provides an introduction to reproducibility using R.


Click on the image below to access the slides:

click there for slides

Related packages


knitr provides excellent resources for literate programming mixing R with LaTeX or markdown.

It is extensively documented at:

To install the current stable, CRAN version of the package, type:


To benefit from the latest features and bug fixes, install the development version of the package using:

update.packages(ask = FALSE, repos = '')
install.packages('knitr', repos = c('', ''))


rmarkdown extends the capabilities of knitr with a more diverse set of outputs generated from Rmd files, including pdf documents, article templates, pdf or html slides, or even web applications.

More information on rmarkdown is available from:

To install this package, type:


For the devel version, type (uses devtools):



lintr will analyse your code and point out deviations from current good coding practices. It can be ran on a .R file, but also can be used to analyse code typed in real-time for a number of coding platforms including Rstudio, emacs and others.

For more information on this package, go to:

To install this package, type:


About this document


  • Thibaut Jombart: initial version

Contributions are welcome via pull requests. The source files include:

License: CC-BY Copyright: Thibaut Jombart, 2017