Class is over!

Thank you for participating. The course materials will remain online indefinitely.

Syllabus

All sessions will take place in FXB G-12 from 2-3:30 pm.

Schedule:

Day 1 (9/6/19)

Figures

View the slides here (or download as pdf)

Download the scripts and data here.

If you’re having trouble with R on your own machine, click this link and sign up for a free RStudio cloud account. You’ll be able to access all the materials directly.

Some ggplot2 resources mentioned in the slides:

You can watch a video of class here.

Download the solution scripts.

Day 2 (9/13/19)

Selecting, filtering, and mutating

View the slides here (or download as pdf).

Download the scripts and data here.

Open the project in RStudio Cloud here.

Resources:

You can watch a video of class here.

Download the solution script.

Day 3 (9/27/19)

Grouping and tables

View the slides here (or download as pdf).

Download the scripts and data here.

Open the project in RStudio Cloud here.

Resources:

  • Here’s a great blog post on summarizing data that goes above and beyond what we do. Check out the other posts under the tutorial tag as well!
  • We’ve covered many of the highlights of the dplyr package. Read its vignette here.

You can watch a video of class here.

Download the solution script.

Day 4 (10/11/19)

Functions

View the slides here (or download as pdf).

Download the scripts and data here.

Open the project in RStudio Cloud here.

Resources:

  • Blog post focusing on these “scoped” variants
  • Series of blog posts that help with manipulating data
  • Two videos (here and here) about some more advanced topics that allow us to pass variable names to functions
  • Blog post on the apply() family of functions
  • Video tutorial on the map() family of functions

You can watch a video of class here. (The first ~10 minutes are from an earlier presentation that went over; just skip ahead.)

Download the solution script.

Day 5 (10/18/19)

Analyze your data

View the slides here (or download as pdf).

Download the scripts and data here.

Open the project in RStudio Cloud here.

Resources (other packages I like but didn’t mention):

You can watch a video of class here.

RStudio tips and tricks

The font you saw in my RStudio is Fira Code. Instructions to install can be found here.

Beyond the themes that come pre-installed with RStudio, there are a variety of others available with the rsthemes package here.

You can also make your own theme! There’s more information in this article.

If you use certain headers like # ---- in your code, your code sections will be automatically labeled and you can use the outline viewer (the rightmost button direct above your script) or the section selector (bottom left of the script section). Read more here.


Creative Commons License Introduction to R by Louisa H. Smith (including all of the materials on this site) is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.