Problem set 01
Due by
Task 1: Get up and running with R, RStudio, and the Tidyverse
The first thing we need to do is install the tools we’ll be using. We’ll follow the steps in Example 01 in class.
Task 2: Get introduced to R
Complete these primers.
- The Basics
- Work with Data
Task 3: Get familiar with RStudio
The RStudio primers were set up to run in a browser in a semi-interactive way. But you typically won’t type code in a browser when you work with R. Instead, you’ll use RStudio. RStudio is an integrated development environment, or IDE. It is an application that acts as a kind of staging zone for the various related things you have to do when doing data analysis. It lets you type and save code in scripts or documents, run that code in R itself, see the results of what you have written, and manage various other tasks.
Task 4: RStudio projects
Read this very short chapter on RStudio projects to learn how to create and use them.
When working independently, you create a new project by going to File > New Project > New Directory > Empty Project. This will create a new folder on your computer that is empty except for a single .Rproj
file. Double click on that file to open an RStudio instance that is pointed at the correct folder.
For today, and for most of our problem sets, we will start with a zipped (i.e. compressed) file containing a project that has been partly prepared in advance.
Click the button above to download the project. Unzip it, and double-click the file named 01-problem-set.Rproj
to launch a new instance of RStudio. In RStudio, open the file named analysis.Rmd
and knit it. Read the Rmd
file and compare it to its output.
Task 5: Getting familiar with RMarkdown
To ensure that the analysis and graphics you make are reproducible, you’ll do the majority of your work in this class using R Markdown files. Watch this brief video, maybe more than once: