Whether you’re dipping into the R programming language for the first time or adding it to your current toolkit, you’re not alone. As of March 2019, R is ranked 14th in the TIOBE Index
(up from 20th a year ago), and was the 7th-ranked language of 2018
according to engineering and applied sciences magazine IEEE. There’s a good reason behind those rankings: The R programming language is widely used by statisticians and data analysts. It’s free and open source, runs on a wide variety of platforms, and has powerful visualization capabilities. R also has a vibrant community and a plethora of online resources. And that’s not all: According to our 2019 Tech Salary Report
, it is a top-paying tech skill that can command $107,873 a year (a 1.8 percent increase from 2018). (Reports of R's death, in fact, seem very premature
(the “Comprehensive R Archive Network”) is where you can download and install R. (It’s also a repository with thousands of community-provided R packages
that could help meet your specific needs.) R has a steep learning curve for first-time programmers, but is easy to learn for those with more experience (though there are some specific quirks
to keep in mind). If you’re looking for introductory books, online tutorials, videos, and more on the R programming language, here are some places to start:
The Swirl software package
provides a series of self-paced 10-20 minute lessons within an interactive learning environment. It’s geared for beginners and works directly in the R console, so you can work straight from the command line and get structured feedback. The content is free and open-source.
Introduction to R (DataCamp)
The online data science learning platform DataCamp provides multiple interactive R programming language courses, starting with a free introduction
. This intro explains common data structures, including vectors, matrices, and data frames. From there, you can take additional courses for a flat fee of $29 a month for individuals (or $25/month if you sign up for a year).
R Programming Tutorial Lessons
YouTube has many R videos, including a 24-video playlist
that begins with installation instructions and walks you through variables, vectors, data frames, functions, and more.
R for Data Science
R For Data Science is a free e-book
that explains how to import, tidy, transform, visualize and model data—and how to communicate what you find using R Markdown. Each section has plenty of exercises for practice. The book is co-authored by Hadley Wickham, creator of the Tidyverse, a set of packages and tools that includes widely used packages for manipulating and visualizing data.
This book (by Joseph Adler) serves as a thorough desktop reference for R, with hundreds of examples of how R functions and packages are used across multiple industries.
This book (by Paul Teetor) provides recipes addressing specific problems that can be solved in R, along with the solutions. It can help improve your productivity, and provides detailed explanations for the solutions that could get you over the hump. Recipes include those for creating graphic displays, building statistical models, working with probability and probability distributions, creating vectors, using data frames, and more.
This Starch Press book, written by computer science professor Norman Matloff, starts with basic data structures and then gets deep—teaching function and object-oriented programming, mathematical simulations, debugging, performance enhancement, and more.
Even More on the R Programming Language...
You can find user groups in your area
, or get help on Stack Overflow
, RStudio Community
, or on any of the R Project’s email lists, such as R-help
, and R-package-devel
. (It’s a good idea to read the R mailing list instructions
and the posting guide
before sending questions to the list.) Another great reference is the R style guide
, which offers guidelines for writing R code that’s easy to maintain (and for others to read and understand). Alternatively, see the blog aggregator R bloggers
, which reposts relevant articles from across the web. Finally, look for The R Project for Statistical Computing
group on LinkedIn, or the #rstats hashtag on Twitter.