Instructions for installing R and RStudio


To get the most out of this workshop, please bring your own laptop and do the following before the workshop. It should take about 15 minutes (with a fast internet connection) to complete the steps below.

  1. Create a working directory for the workshop on your computer
  2. In this working directory, save a text file with the path of the directory.
    • On a Mac, you can find out a path by right-clicking on a folder (or file) and pressing the "Option" key on your keyboard. Then, choose "Copy ... as Pathname". The path might be something like: /Users/johanneskarreth/Documents/Dropbox/POL 452/R workshop
    • On Windows, you can find out a path by holding down the Shift key as you right-click the folder (or file), and then choose "Copy As Path". The path might be something like: C:\Users\jkarreth.URSINUS\Documents\Dropbox\POL 452/R workshop
  3. Download the most recent version of R from https://www.r-project.org (3.5.1 or higher)
  4. Open the downloaded file (version 3.5.1 or higher) and follow the installation instructions:
    • R-3.5.1.pkg for Mac
    • R-3.5.1-win.exe for Windows
  5. Download the most recent version of RStudio Desktop (1.1.456 or higher) from https://www.rstudio.com/products/rstudio/download/. Scroll down to "Installers for Supported Platforms" and choose the installer for your operating system.
  6. Open the downloaded file (version 1.1.456 or higher):
    • RStudio-1.1.456.dmg for Mac
    • RStudio-1.1.456.exe for Windows
  7. Open RStudio. You should see a screen that looks similar to the image below: RStudio
  8. In the center right (highlighted above), click on the "Packages" tab: Package tab
  9. Click "Install" (highlighted above) and type the following into the text box:
    tidyverse rio igraph mapdata rvest blscrapeR viridis visNetwork
    then click the "Install" button. Make sure the [x] Install dependencies checkbox is checked.
  10. Package installer

  11. Download the folder Data.zip (click through for Dropbox link; choose "Direct download") and save it in your working directory for this workshop and unzip it. Your working directory should now look similar to the following:
  12. Working directory