R
Learning R
I highly recommend subscribing to the R Weekly newsletter. This e-mail is sent every Monday and is full of helpful tutorials about how to do stuff with R.
Searching for help with R on Google can sometimes be tricky because the program name is a single letter. Google is generally smart enough to figure out what you mean when you search for “r scatterplot”, but if it does struggle, try searching for “rstats” instead (e.g. “rstats scatterplot”). Also, since most of your R work in this class will deal with ggplot2, it’s often easier to just search for that instead of the letter “r” (e.g. “ggplot scatterplot”).
If you use Twitter, post R-related questions and content with #rstats. The community there is exceptionally generous and helpful. Also check out StackOverflow (a Q&A site with hundreds of thousands of answers to all sorts of programming questions) and RStudio Community (a forum specifically designed for people using RStudio and the tidyverse (i.e. you)).
These resources are also really really helpful:
- R for Data Science: A free online book for learning the basics of R and the tidyverse.
- R and RStudio cheat sheets: A large collection of simple cheat sheets for RStudio, ggplot2, and other R-related things.
- Stat 545: Dr. Jenny Bryan at RStudio has an entire introductory course in R, visualization, and data analysis online.
- STA 112FS: Data Science: Dr. Mine Çetinkaya-Rundel at the University of Edinburgh / Duke University has an entire introductory course in R, visualization, and data science online.
- CSE 631: Principles & Practice of Data Visualization: Yet another introductory course for R and ggplot2 by Dr. Alison Presmanes Hill at RStudio.
R in the wild
A popular (and increasingly standard) way for sharing your analyses and visualizations is to post an annotated explanation of your process somewhere online. RStudio allows you to publish knitted HTML files directly to RPubs, but you can also post your output to a blog or other type of website.1 Reading these kinds of posts is one of the best ways to learn R, since they walk you through each step of the process and show the code and output.
Here are some of the best examples I’ve come across:
- Text analysis of Trump’s tweets confirms he writes only the (angrier) Android half (with a follow-up)
- Bob Ross - Joy of Painting
- Bechdel analysis using the tidyverse: There are also a bunch of other examples using data from FiveThirtyEight.
- Sexism on the Silver Screen: Exploring film’s gender divide
- Comparison of Quentin Tarantino Movies by Box Office and the Bechdel Test
- Who came to vote in Utah’s caucuses?
- Health care indicators in Utah counties
- Song lyrics across the United States
- A decade (ish) of listening to Sigur Rós
- When is Tom peeping these days?: There are a also bunch of final projects from other R and data visualization classes here and here.
- Mapping Fall Foliage
- General (Attys) Distributions
- Disproving Approval
-
If you want to be really fancy, you can use blogdown, which makes a complete website with R Markdown files. That’s actually how this site is built (see the source code). You can build your own site with this tutorial. ↩︎