R programming resources

This is a list of resources I’ve found useful when getting familiar with the R-language. Some are absolutely essential! Some of my own blog posts will also be related to R-programming, and you will find a list of these at the bottom of this page as they appear.

In my workflow I always use RStudio, organize my work in Rprojects, do most of my writing and analyses in RMarkdown files, and try to format my code using tidyverse style syntax. There are plenty other ways of organizing your work, but this is my preferred structure, and the resources below will be selected on that basis.

Books

These books are freely available online. If you are new to R, my recommendation is to start from the top, although the recommendations are not really in any order.

  • R for Data Science, by Hadley Wickham and Garett Grolemund. This is where you start. You will not regret spending a week or two with this book, doing the exercises. After, you will be capable of most basic data handling and manipulation, visualizing and plotting, as well as functional programming and modeling using the Tidyverse packages.
  • R Markdown: The definitive guide, by Yihui Xie, J.J. Allaire and Garrett Grolemund. All you need to know about R Markdown documents, and then some.
  • Tidy evaluation, by Lionel Henry and Hadley Wickham. Tidy evaluation is a useful tool provided by the rlang package. These tools are extremely useful for functional programming using the tidyverse packages.
  • Advanced R, by Hadley Wickham. After reading the books above, learning the basics, you may come across more advanced problems which is hard to solve using the basic tools. Then this is where to look for the next step.
  • Interactive web-based data visualization with R, plotly, and shiny. Want to make interactive and animated visualizations? This book tells you how to do that!
  • blogdown: Creating Websites with R Markdown, by Yihui Xie, Amber Thomas and Alison Presmanes Hill. Want to make your own homepage using tools you already know? This is the book for you.
  • bookdown: Authoring Books and Technical Documents with R Markdown, by Yihui Xie. How to use R Markdown to write books, theses and other technical documents. Most books in this list is written using bookdown.
  • R Packages, by Hadley Wickham. Want to make your very own R Package? Here’s the recipe!

Resource collections

  • RStudio. On this page you will find plenty of resources, cheat sheets, webinars and conference recordings, and lots of other things.
  • Tidyverse. All you need to know about the Tidyverse, a family of R packages designed to work very well together. These packages should make up the basic framework in your workflow.
  • R-bloggers. A web page collecting news and tutorials from many contributors blogging about R programming. If you use R in your daily work, I highly recommend following them on Facebook for daily updates.
Avatar
Vegard Lysne
Senior Advisor

Clinical Dietitian, PhD. See more about Vegard.

Previous