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:
- Introduction to version control with git and GitHub within RStudio: This tutorial explains how to set up a simple project with version control.
- Collaborative coding with GitHub and RStudio: Here you can learn how to collaborate with others on code projects using GitHub.
- Introduction to R: This is an introduction to the R programming language.
- Introduction to
renv
: Here you can learn how to manage the dependencies of an R project. - Introduction to Quarto: Learn how to combine prose and code to make documents more reproducible.
- Introduction to Zotero: Get introduced to the reference management software Zotero.
- FAIR research data management: Learn how to make your data findable, accessible, interoperable, and reusable.
While the general principles taught in this tutorial apply to most researchers publishing code, we will make very specific suggestions what tools to use.
In particular, we will assume you have installed Git, R, RStudio, and Quarto. Windows users may additionally need RTools.
Note 1: Alternatives to Quarto
Quarto is a tool to render dynamic documents, but not the only one. You may also use rmarkdown
, Jupyter Book, Stencila, Curvenote, showyourwork!, Org Mode, StatTag, or one of the countless others.
We will start with creating a simple report which incorporates R code. Then, we will focus on what is required to publish your work:
- removing legal barriers: adding an appropriate license
- high-level documentation: creating a README file
- archival: uploading it to a repository