Learning R resources

Learning R: where to start

Swirl (https://swirlstats.com/)

I really like the swirl package in R that has several modules available for learning and understanding how R works. It leads you by the hand through straight forward courses that are carried out through the R console. There are a number of additional courses available (see: https://github.com/swirldev/swirl_courses#swirl-courses). Adventr is another package that does a similar thing - interactive tutorials, but I have not used that one.

R for Psychological Science (https://psyr.org/)

This is a great resource for learning R. You can just cross out Psychological and replace it with Ecology and no one would know…. It’s such a nice and easy introduction to R and how to use it well.

R - bloggers (https://www.r-bloggers.com/)

A useful place to find code examples of all kinds of different functions that you never thought you would need or want to play with. New packages are often highlighted and demonstrated on here.

Tidyverse (https://www.tidyverse.org/)

There is some tensions between different factions in the R world - those who use base and those who use Tidy. I would learn Tidy from the outset as it does make your code cleaner and has (to me at least) a more logical structure. I love the way you can flow code directly into a plot.

Tidy Tuesday https://github.com/rfordatascience/tidytuesday

A friendly and supportive community which releases a data set weekly (on… you guessed it… Tuesday ) that people then manipulate using R (using the “Tidy” principles) and do some data visualisation. You can learn a lot from how others approach a dataset and also have a go yourself to improve your coding skills.

Cheat sheets (https://rstudio.com/resources/cheatsheets/)

Lots of cheat sheets available at this site. Cheatsheets give a quick overview of functions that you might not use every day.

Stackoverflow (https://stackoverflow.com/)

If you are stuck there were probably 100000s of people who have at one stage been stuck with the same thing. Search Google and you will probably end up here at Stackoverflow. It’s a great resource where people try and help each other when they are stuck with code. Sometimes it can be an intimidating place for beginners, but they have put a lot of things in place to make it nicer…. Remember reproducible code - people need to replicate your error so they can help.

A bit more advanced

Advanced R (https://adv-r.hadley.nz/)

It says it all in the title. Useful for going beyond the basics

Happy Git with R (https://happygitwithr.com/)

Get yourself up and running on Github quickly using this great resource. Github is useful for version control of code, sharing code and for collaborating with others on a project (it doesn’t have to be just R code either!)

Hands on Machine learning in R (https://bradleyboehmke.github.io/HOML/)

Hands-on guide to machine learning (i.e. regression techniques) in R. Really useful and straight-forward with lots of example code.

R packages (http://r-pkgs.had.co.nz/description.html)

Building a package is tough, but very useful. You can build your own package that stores all your own functions, or can group functions together associated with a publication and share that as a zip file for others to use. I found this blog a much easier way in to building a package (https://hilaryparker.com/2014/04/29/writing-an-r-package-from-scratch/)

Avatar
Matt Grainger
Post-Doctorial Fellow

Related