R Learning Path: From beginner to expert in R in 7 steps
This learning path is mainly for novice R users that are just getting started but it will also cover some of the latest changes in the language that might appeal to more advanced R users.
Learning R can be tricky, especially if you have no programming experience or are more familiar working with point-and-click statistical software versus a real programming language. This learning path is mainly for novice R users that are just getting started but it will also cover some of the latest changes in the language that might appeal to more advanced R users.
Creating this learning path was a continuous trade-off between being pragmatic and exhaustive. There are many excellent (free) resources on R out there, and unfortunately not all could be covered here. The material presented here is a mix of relevant documentation, online courses, books, and more that we believe is best to get you up to speed with R as fast as possible.
Here is an outline:
- Step 0: Why you should learn R
- Step 1: The Set-Up
- Step 2: Understanding the R Syntax
- Step 3: The core of R -> packages
- Step 4: Help?!
- Step 5: The Data Analysis Workflow
- 5.1 Importing Data
- 5.2 Data Manipulation
- 5.3 Data Visualization
- 5.4 The stats part
- 5.5 Reporting your results
- Step 6: Become an R wizard and discovering exciting new stuff
Step 0: Why you should learn R
R is rapidly becoming the lingua franca of Data Science. Having its origins in academics, you will spot it today in an increasing number of business settings as well where it is a contestant to commercial software incumbents such as SAS, STATA and SPSS. Each year, R gains in popularity and in 2015 IEEE listed R in the top ten languages of 2015.
Fig. 1: IEEE Spectrum ranking of Programming Language Popularity. Left column: 2015 ranking, right: 2014 ranking.
This implies that the demand for individuals with R knowledge is growing, and consequently learning R is definitely a smart investment career wise (according to this survey R even is the highest paying skill). This growth is unlikely to plateau in the next years with large players such as Oracle & Microsoft stepping up by including R in its offerings.
Nevertheless, money should not be the only driver when deciding to learn a new technology or programming language. Luckily, R has a lot more to offer than a solid paycheck. By engaging yourself with R, you will become familiar with a highly diverse and interesting community. Namely, R is being used for a diverse set of task such as finance, genomic analysis, real estate, paid advertising, and much more. All these fields are actively contributing to the development of R. You will encounter a diverse set of examples and applications on a daily basis, keeping things interesting and giving you the ability to apply your knowledge on a diverse range of problems.
Have fun!
Step 1: The Set-Up
Before you can actually start working in R, you need to download a copy of it on your local computer. R is continuously evolving and different versions have been released since R was born in 1993 with (funny) names such as World-Famous Astronaut and Wooden Christmas-Tree. Installing R is pretty straightforward and there are binaries available for Linux, Mac and Windows from the Comprehensive R Archive Network (CRAN).
Once R is installed, you should consider installing one of R’s integrated development environment as well (although you could also work with the basic R console if you prefer). Two fairly established IDE’s are RStudio and Architect. In case you prefer a graphical user interface, you should check out R-commander.
Step 2: Understanding the R Syntax
Learning the syntax of a programming language like R is very similar to the way you would learn a natural language like French or Spanish: by practice & by doing. One of the best ways to learn R by doing is through the following (online) tutorials:
- DataCamp’s free introduction to R tutorial and the follow-up course Intermediate R programming. These courses teach you R programming and data science interactively, at your own pace, in the comfort of your browser.
- The swirl package, a package with offline interactive R coding exercises. There is also an online version available that requires no set-up.
- On edX you can take Introduction to R Programming by Microsoft.
- The R Programming course by Johns Hopkins on Coursera.
Next to these online tutorials there are also some very good introductory books and written tutorials to get you started:
- Jared Lander’s R for Everyone
- R in Action by Robert Kabacoff
- The free introduction to R manual by CRAN