R and RStudio Setup

Before the first day of class, you should follow these instructions to set up the software that we’ll be using throughout the semester. Even if you’ve already downloaded both R and RStudio, you’ll want to re-download to make sure that you have the most current versions.

Highly recommended: Change the default file download location for your internet browser.


Required: Download R and RStudio


Highly Recommended: Watch this video made by Dr. Lisa Lendway that describes essential configuration options for RStudio.


Required: Install the most up-to-date versions of the required R packages for this course.

install.packages(c("tidyverse","tidymodels","GGally","ISLR"), dependencies = TRUE)

Optional: For a refresher on RStudio features, watch this video. It also shows you how to customize the layout and color scheme of RStudio.



Troubleshooting

  • Problem: You are on a Mac and getting the following error (or something similar):
    Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
     there is no package called ‘rlang’

Here’s how to fix it:

  • First install the suite of Command Line Tools for Mac using the instructions here.
  • Next enter install.packages("rlang") in the Console.
  • Finally check that entering library(ggplot2) gives no errors.