Chapter 1 Prerequisites

1.1 Welcome!

Welcome to the Reproducible Research with GitHub and RStudio workshop! We are excited to have you join us for this training whether you are a veteran version control user or this is your first foray into the world of GitHub.

1.2 Before you arrive

To maximize the value of this workshop to you all there are some steps we recommend you take before the day of our training. Depending on whether you’ve used RStudio and/or GitHub before you may have already completed some or all of these steps but please read through the following materials regardless to ensure that all participants arrive with a common foundation of installed programs.

The steps that we recommend you take fall under two categories:

  • Downloading software you will need
  • Connecting those programs

Note for those of you with a dedicated IT team that has sole power to install software on your computer. You will need to contact them before the workshop to install the following programs: 1 - R, 2 - RStudio, and 3 - git

1.2.1 Getting started – Download

1. Install/upgrade R and RStudio

  • If you have R and RStudio and your version begins with a four (e.g., “4.x.x”) then you do not need to update though it is sometimes useful

2. Install git

  • If you are a Windows user, be sure to follow along with “Option 1” in the instructions linked above! That variant gives some under-the-hood tools we’ll implicitly rely on later

1.2.2 Getting started – Connect

3. Create a GitHub account

4. Connect git & GitHub

  • You may want to review the “shell” (also known as the “terminal” or “command line”) to help with this step

5. Create a personal access token (PAT)

  • This step is essentially a more secure password that git requires and we provide the necessary steps directly below
  • In RStudio run the following lines
# Install the `usethis` and `gitcreds` packages
#install.packages(c("usethis", "gitcreds"))
library(usethis); library(gitcreds)

# Add your GitHub username and email
usethis::use_git_config( = "Jane Doe",
               = "")

# Create a token (Note this will open a GitHub browser tab)
# See steps 6-10 in GitHub's tutorial (link below)

# Copy your Personal Access Token at the end of the above step!

# Now, give your token to RStudio
# After you run this line you'll follow some prompts in the "Console" tab of RStudio

If this seems a little intimidating, please keep in mind that your experience with downloading programs and creating web accounts will help with these tasks even if you have more minimal coding experience!

1.2.3 Let’s Get To It!

We aim to make this training fun, informative, and not overly terrifying so please reach out if you have any questions before, during, or after the workshop! Our contact information is listed below: