R
ResourcesData Analysis with R
: Tips for Making Your R
Life Better
Below are some of the resources mentioned in the slides. See the slides themselves for more explanation and examples!
R
The main R
website is www.r-project.org.
Download and install R
for your operating system at CRAN:
cloud.r-project.org
I can help on Windows (because I have to) and Linux (because I love to).
On OS X/macOS, you’re on your own. Try the FAQ or these posts by Bob Rudis (here and here).
The main RStudio website is www.rstudio.com.
Download and install RStudio for your operating system here:
https://www.rstudio.com/products/rstudio/download/
R
ScriptsFollow Hadley Wickham’s code style guidelines.
R
and RStudio Basics: ResourcesR for Data Science workflow basics
Free Introduction to R course at DataCamp
swirl: Learn R, in R.
Free R Programming course at Coursera and its free book:
R Programming for Data Science by Roger Peng
Hands on Programming with R by Garrett Grolemund
RStudio Essentials video (watch at least the first 15–20 minutes)
RStudio IDE Cheat Sheet
In RStudio: Help > Cheatsheets > RStudio IDE Cheat Sheet
ggplot2
for Graphicsggplot2
ResourcesOfficial ggplot2
website and documentation: http://ggplot2.org/
Official ggplot2
book
Data Visualization Cheat Sheet
In RStudio: Help > Cheatsheets > Data Visualization with ggplot2
Tidy data means:
If you do not have tidy data, the tidyr
package can be used to tidy your data.
dplyr
dplyr
ResourcesTidy Data and Lord of the Rings by Jenny Bryan
R for Data Science: Tidy Data, dplyr
Official Introduction to dplyr
STAT 545 Basic care and feeding of data in R
STAT 545 Introduction to dplyr
STAT 545 dplyr functions for a single dataset
Video Introduction to the dplyr R package by Roger Peng
readr
for Data ImportSee Data Import in R for Data Science and Getting data in and out of R from the STAT 545 site.
R
WARNING: updates to packages may break your scripts. I’d highly recommend avoiding updates during a project (unless you have time to fix anything that breaks).
Google is your friend!
Often, literally typing your question (with “R” in it) or pasting an error message into Google will give you helpful results. There are tons of R blogs and other resources readily available.
There is an R Help e-mail list, the text of which can be found online. Only ask for help on this list if you’ve tried everything you can possibly think of to find the answer yourself, memorized the Posting Guide, and followed the Posting Guide meticulously. And don’t be surprised if you get a rude answer.
You can try rseek.org to search Google for R
-specific results.
Lots of good answers are found at StackExchange / Stack Overflow.
Statistics questions are answered at Cross Validated.
Ask someone you know in person! I generally would love to help you get better at R
and am happy to answer questions.