Code Publishing Tutorial

This tutorial covers how to make your code available to others. It wraps up a series of tutorials which we recommend to go through in advance:

While the general principles taught in this tutorial apply to most researchers publishing code, we will focus on the programming language R and the publishing system Quarto.

To follow the tutorial you need to have installed Git, R, and Quarto. Windows users may additionally need RTools. Some things will be explained using the RStudio IDE, but you are free to use any IDE you like.

Quarto is a tool to render dynamic documents, but not the only one.

It is the successor of the R package rmarkdown and mostly backwards-compatible. rmarkdown continues to be supported, but the development of new features happens in Quarto. The main difference is that Quarto has first-class support for Python. In other words, Python users of Quarto do not need to have R installed.

While this tutorial focuses on Quarto, you can also create reproducible research projects with the following tools:

We will start with creating a simple report which incorporates R code. Then, we will focus on what is required to publish your work:

Get started