B Cheat Sheets

Below is a consolidation of all “cheat sheets” mentioned in the notes, as well as a few extra that are not mentioned. This page is intended for you to use as a quick reference for basically the entire course without needing to dig through the notes. They’re loosely organized by order of appearance.

B.1 Rstudio IDE

The Rstudio cheat sheet has a VERY detailed description of what every button in Rstudio does, as well as some additional tips like common keyboard shortcuts and workflow suggestions.

B.2 Base R

  • Matt Baggott’s R Reference Card v2.0 is a nice complete one-stop-shop for all of R’s built-in functions.
  • IQSS’s Base R Cheat Sheet and Alexey Shipunov’s One Page R Reference Card are both slightly shorter and more curated, but offer a nice, tighter set of the most critical R commands, along with useful examples of their syntax.
  • For a slightly longer but more complete reference manual on R, especially with more details of how R works and different object types and data structures, Emmanuel Paradis’s R for Beginners may be helpful.

B.3 R Markdown

  • The R Markdown cheat sheet has a convenient summary of everything you need to know and more to effectively use R Markdown, including basic markdown syntax, common chunk/YAML options, additional styling settings, and more.
  • There’s also a slightly longer R Markdown reference guide with a longer list of chunk and YAML options.
  • There’s also a separate Markdown cheat sheet; note the basic syntax is completely supported, but some of the extended syntax is not supported. Feel free to experiment more on your own.

B.4 \(\LaTeX\)

If you wish to read more on \(\LaTeX\), start with Rong Zhuang’s MathJax cheat sheet or David Richeson’s quick guide which both have lots of great beginner-friendly examples. For a slightly more complete list of symbols, Eric Torrence’s cheat sheet may also be useful.

B.5 readr

The readr cheat sheet has a good overview of all read_* functions as well as example code and some common arguments.

B.6 lubridate

The first page of the lubridate cheat sheet is useful for quickly checking if you’re using the right date-related operation.

B.7 ggplot2

The ggplot2 cheat sheet has a great summary of every plot type on the first page, organized by the type and number of variables it’s designed to visualize. On the second page, there’s a nice list of additional plot features, such as faceting (i.e. subplot) options, setting scales, adjusting positions of plot elements, changing themes, editing labels/legends, etc.

B.8 dplyr

The dplyr cheat sheet has a basic rundown of all common data frame transformation operations, grouped by type, along with brief but helpful examples and diagrams. It includes everything from subsetting rows and columns, adding/editing columns, summarizing data frames, grouping operations, joining/binding multiple data frames, etc.

B.9 tidyr

The tidyr cheat shows a summary of different data tidying operations, only some of which we cover in this class. Notably, we use some of the NA and reshaping operations. Feel free to read more on your own.