Zach del Rosario 2020-05-02
Purpose: We’re going to make extensive use of the R programming language; in particular, the Tidyverse packages. This first exercise will guide you through setting up the necessary software.
Reading: (None)
q1 Install Rstudio
Download RStudio Desktop and install the R programming language. Both are free!
Once installed, you can download the source for this exercise and open open it in RStudio (or you can follow e-rep01-intro-git
and clone the repository). This is an R Markdown
file, which is a combination of human-readable text and machine-readable code. Think of it as a modern take on a lab notebook.
q2 Install packages
Next, run RStudio. When the program opens, you should see a console tab, as in the image below.
Note that RStudio has multiple tabs, including the Console
, Terminal
, Jobs
, and any files you may have opened. Make sure you are in the Console
tab.
Type the line install.packages("tidyverse")
in your Console
and press Enter. This will start the installation of the tidyverse
package, which we will use extensively in this class.
q3 Test your install
Once your installation has finished, return to your console and use the command library(tidyverse)
. If your installation is complete, this command should return a list of packages and version numbers, similar to the image below.
If you have any issues with installation, please let me know!
q4 Download extras
We’ll use a number of extras for this class. To that end, please install the following packages.
curl
mvtnorm
nycflights13
gapminder
ggrepel
googlesheets4
viridis
q5 Download cheatsheets
The tidyverse
is essentially a language built on top of R. As such, there are a lot of functions to remember. To that end, RStudio has put together a number of cheatsheets to reference when doing data science. Some of the most important ones are:
Later, we will learn special tools for handling:
For every exercise, your deliverable will to complete an “exit ticket”. Make sure to follow the survey link at the end of every exercise and submit the survey to get credit for your work! Note that in RStudio you can Ctrl + Click (CMD + Click) to follow a link.
Once you have completed this exercise, make sure to fill out the exit ticket survey, linked here.