Preparation

Quarto

Quarto is a document format similar to RMarkdown and Jupyter Notebooks. It’s also the name of a standalone software which allows us to convert Quarto Documents to PDF or HTML. If you followed our instructions in Install or update RStudio, you should have Quarto installed on your computer. But please double-check this by running the following in your terminal (see Figure 10.1).

quarto --version

If the above command returns a version number (e.g. 1.5.30) this means quarto is installed. If the command returns something like command not found: quarto we highly recommend you Update Rstudio. Alternatively, you can also just download and install the Current Release of quarto.

Figure 10.1: The terminal should be located next to the R-Console. If you don’t see it there, create a new terminal by clicking on ToolsTerminalNew Terminal.

Install Git

Git is a software dedicated to tracking changes in text files (e.g. R scripts). It’s heavily used in the software industry as well as in the field of data science. In this course, we will teach use the basic functionalities of Git and combine it with the online portal Github.

Therefore, the next step is to install Git. There are different Git installers to choose from, we recommend the following1:

  • We recommend installing Git for Windows, also known as msysgit or “Git Bash”.
  • When asked about “Adjusting your PATH environment”, select “Git from the command line and also from 3rd-party software”
  • RStudio prefers Git to be installed in C:\Program Files\Git, we recommend following this convention
  • Otherwise, we believe it is good to accept the defaults
  • We recommend you install the Xcode command line tools (not all of Xcode), which includes Git
  • Go to the shell and enter xcode-select --install to install developer command line tools
  • On Ubuntu or Debian Linux: sudo apt-get install git
  • On Fedora or RedHat Linux: sudo yum install git

Change RStudio Settings

Now, restart RStudio. Then, go to Tools → Global options → Git / SVN.

  • Activate the option “Enable version control interface for RStudio projects
  • If the Field “Git executable:” shows (Not Found), browse to your git installation from the previous step.
  • This path should look something like this:

C:\Program Files\Git\bin\git.exe (not C:\Program Files\Git\cmd\git.exe or some-path\git-bash.exe)

/usr/bin/git

Create a Github account

Create a Github account on github.com (it’s free of course). We recommend you use your students email address. When choosing a username on Github, consider the following advice:

  • incorporating your actual name is nice, people like to know who they are dealing with
  • choose a name that you are comfortable revealing it to a future boss
  • shorter is better than longer
  • make it timeless (e.g. don’t incorporate your university’s name)
Note 10.1: Users who already have a Github account

If you already have a Github account (e.g. for work) and don’t mind using this account for the tasks in this course, you are free to use this existing account. However, if you don’t want to mix these activities, we recommend you create a new Github account with your student mail address.


  1. Much of this chapter was taken from Bryan and Heister (2021). If you want to dive deeper into using Git, we highly recommend this book. For an even deeper dive into Git, read Chacon and Straub (2014). Both books are available free and open source on happygitwithr.com and git-scm.com/book, respectively.↩︎