Literate Programming (in R)
Authors
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: (https://creativecommons.org/licenses/by/4.0/)
- Funding: This project has received funding from .
-
(Property in Bioschema: description)
-
(Property in Bioschema: coursePrequsites)
-
(Property in Bioschema: teaches)
-
(Property in Bioschema: audience)
-
(Property in Bioschema: educationalLevel)
-
(Property in Biochema: licence)
-
(This is an example for CONVERGE)
Contributors
Greek Mythology icons made by (https://www.flaticon.com/authors/maxicons) from (www.flaticon.com)
Citing this lesson
Please cite as:
- Saad Arif, Mark Fernandes, Clement Lee, & Elisa Pierfederici. (2024). Literate Programming in R. Zenodo. https://doi.org/10.5281/zenodo.11259813
- 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 (https://github.com/elixir-europe-training/ELIXIR-TrP-LiterateProgrammingR-CodeRep/tree/main/docs/data/breast-cancer-wisconsin.csv); 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 (./chapters/Chapter_04) works, it is recommended that you put the downloaded csv file a (sub-)directory called data/
on your machine; see the example structure in (./chapters/chapter_02/#221-example-structure).
Software setup
The following is consistent with the (./chapters/Chapter_04/#installation-guide) in (./chapters/Chapter_04). To run this lesson you need to install the following:
- R - follow the instructions (https://cran.r-project.org/). You will need R for everything that follows.
- RStudio - follow the instructions (https://posit.co/download/rstudio-desktop/). You will need RStudio (and R) for Chapters (./chapters/chapter_02) and (./chapters/chapter_03).
- Quarto - follow the instructions (https://quarto.org/docs/get-started/). You will need Quarto (and R and RStudio) for Chapters (./chapters/Chapter_04) and (./chapters/chapter_05).
- TinyTex (R package) - required if you want to use LaTeX and/or render PDFs. This is an R package, more info and installation instructions (https://yihui.org/tinytex/).