There are many, many resources out there to help you learn about R. Of course, many of these resources are geared toward statisticians, data scientists, and the like (there’s a reason this website exists). Below are the best resources I’ve come across for the rest of us to learn R.
What is R?
Maybe you’ve heard of R, but aren’t exactly sure what it is. Mark Sellors has written a Field Guide to the R ecosystem, which walks you through what R is, where and how it’s used, and more. If you’re primarily an Excel user, the article Where do things live in R? R for Excel Users by Steph De Silva offers a great overview, translating between the ubiquitous Microsoft spreadsheet software and R. Jesse Sadler has a similar article, offering an intro to R for those coming from Excel.
Install R and RStudio
To get started on your R journey, you first need to install the software. I highly recommend using RStudio, a graphical interface that makes working with R much, much easier. You might check out the Getting Used to R, RStudio, and R Markdown online book by Chester Ismay and Patrick Kennedy, which lays out some important next steps for getting up and running.
Getting Started with R
If you’re ready to get started with R, there are many places to get started.
The RStudio Primers provide an interactive way to begin learning R.
The non-profit organization The Carpentries has tons of materials online, including a section on using R for data analysis and visualization (it’s actually geared toward those using ecology data, but it’s applicable well beyond that). It can help you get started installing R and RStudio and dig into working with data.
Computer World’s Beginner’s Guide to R is a also a great place to dip your feet into the water. They’ve got a series of lessons to help you get started on your R journey. Psychologist Richard Landers at Old Dominion University has put together a website called Data Science for Social Scientists with plenty of information to help you get started. And finally, you also might consider checking out Swirl, an R package that teaches R from within R (yes, it’s a bit meta).
There are also plenty of places that offer online introduction to R type courses. With the caveat that many are geared toward data scientists, statisticians, and the like (prepare to be overwhelmed by jargon), here’s a list of some of the better options are Try R, Alison, Coursera, edX, and CodeSchool.
Going Deeper with R
Once you move beyond the basics, you’ll likely be overwhelmed (in a good way!) with the possibilities that R offers. Some places you might consider continuing your R progress are by watching the webinars that RStudio produces. They touch on a wide range of topics so you’ll almost certainly find something of interest.
Many who use R end up using what’s called the tidyverse. It’s a collection of packages designed for efficient data management, manipulation, and analysis. The bible for Tidyverse users is Hadley Wickham’s book R for Data Science, which is conveniently available online for free. University of British Columbia statistics professor Jenny Bryan teaches a course, Stat 545, which covers general data wrangling, exploration, and analysis. The Modern Dive website has information on doing all sorts of analyses using R.
David Robinson has recently done a series of screencasts, showing himself using the tidyverse to analyze and visualize data from the Tidy Tuesday project. It’s a great way to see a highly talented R user in action.
One major benefit of learning R is that there is a great online community of R users. They are notable for their friendliness (yes, really, friendly strangers on the internet!). Following the #rstats hashtag on Twitter is a great way to keep up on the latest and greatest R developments. Also, consider joining the R4DS (“R for Data Science”) Slack community. It’s a community that sprung up around Hadley Wickham’s book of the same name, though discussions in the group go well beyond that book. It’s a fantastic place to learn from other R users, who are eager to help!
Data Visualization in R
One of the major benefits of R is the ability to produce high-quality graphics. While there are many ways to do this in R, ggplot is the main tool of choice. Hadley Wickham’s book ggplot2: Elegant Graphics for Data Analysis (Use R!) is a great place to get started. I also recommend Kieran Healy’s Data Visualization: A Practical Introduction, and Claus Wilke’s Fundamentals of Data Visualization.
No matter your level of expertise, having something to refer back to when you’re working in R is always helpful. RStudio has as an excellent collection of cheatsheets. Print them out and keep them around for your R learning journey!