Skip to content

Literate Programming (in R)

Authors

Elisa Pierfederici


PhD Candidate, Research advisor, University of Oslo (UiO), Norway

Clement Lee


Lecturer, School of Maths, Stats and Physics, Newcastle University

Saad Arif


Saad Arif, Senior Lecturer, Dept. of BMS, Oxford Brookes University

Mark Fernandes


Mark Fernandes, Teaching Associate, Bioinformatics Training Facility, Dept. of Genetics, University of Cambridge

Lesson overview

Description
A course to introduce the theory, advantages and implementation of Literate Programming practices for R users working in RStudio to enhance the students abilities to produce reproducible code.

Prerequisites
To be able to follow this course, learners should have knowledge in:
 1. Basic programming skills in R
 2. A familiarity in using the RStudio Integrated Development Environment

Learning Outcomes:
By the end of the course, learners will be able to:
 1. Have an understanding of the principles and goals of Literate Programming (LP)
 2. Practically implement LP in their R programs using Markdown in Quarto/Rstudio

Target Audience: Researchers, undergraduate students, postgraduate students, etc…

Level: Beginner to Intermediate

License: Creative Commons Attribution 4.0 International License

Funding: This project has received funding from [name of funders].

Contributors

Your name here!


Lorem ipsum dolor sit amet.


Citing this lesson

Please cite as:

  1. Enter your citation here.
  2. Geert van Geest, Elin Kronander, Jose Alejandro Romero Herrera, Nadja Žlender, & Alexia Cardona. (2023). The ELIXIR Training Lesson Template - Developing Training Together (v1.0.0-alpha). Zenodo. https://doi.org/10.5281/zenodo.7913092.

Setup

Data setup

To run this lesson you need to download the data here; the GitHub repository at which the csv file is situated also contains the scripts that generate the page you are looking at. To ensure that the code in Chapter 4 works, it is recommended that you put the downloaded csv file a (sub-)directory called data/ on your machine; see the example structure in Chapter 2.

Software setup

The following is consistent with the installation guide in Chapter 4. To run this lesson you need to install the following:

  • R - follow the instructions here. You will need R for everything that follows.
  • RStudio - follow the instructions here. You will need RStudio (and R) for Chapters 2 and 3.
  • Quarto - follow the instructions here. You will need Quarto (and R and RStudio) for Chapters 4 and 5.
  • TinyTex (R package) - required if you want to use LaTeX and/or render PDFs. This is an R package, more info and installation instructions here.