Experts

Even once you are an expert at R code development, learning some topics in depth will both help you develop better code and share it more effectively with others.

  • Dive into the foundations of R. Most R users are not programmers, and therefore much of their R code is not as readable, fast, or efficient as it could be. The second edition of Hadley Wickham’s book, Advanced R (2019) (available for free online and as an O’Reilly paperback from Amazon), unlocks many of the secrets behind how R works the way it does, and gives you new strategies for solving diverse problems. You may also want to bookmark Advanced R Solutions, which provides worked solutions to the exercises in this book.

  • Learn how to extend R. While its content sometime overlaps with Hadley’s Advanced R, the R Core Team offers Writing R Extensions (electronic version) on CRAN. This book is particularly useful if you wish to add your own C and C++ routines to R, but also has unique information on debugging, the R API, and runtime profiling that is difficult to find anywhere else.

  • Build your own packages. R packages allow you to share your functions with other R programmers in a modular and easy-to-integrate way. The above-mentioned Writing R Extensions documents how to write packages, but you may find Hadley Wickham’s R Packages book (2015) (electronic here (1st edition) and an O’Reilly paperback (1st edition) from Amazon here) a bit easier to read and more step-by-step. The second edition of the R Packages book is currently in progress, written by Hadley and co-author Jenny Bryan. You can read the in-progress book for free online. If you want your R code to reach the widest possible population of developers, you’ll want to know how to build packages.

  • Use Python in your analyses. Anyone who insists you must choose between R and Python for doing data science is creating a false choice. R offers an easy way to incorporate Python code in the reticulate package. Sean Lopp’s webinar, R, RStudio 1.2 & Python—a love story, demonstrates how easily developers can integrate Python code into their R workflows and walks through the development of a reticulated Shiny app.

  • Try your hand at Tensorflow for deep learning. RStudio hosts a web site dedicated to R and Tensorflow at tensorflow.rstudio.com, where you can learn how to use deep learning in your analyses. J.J. Allaire and Francois Chollet have published a Deep Learning with R book (2018). You can hear J.J. describe the philosophy behind the system in his rstudio::conf 2019 video. For an quick overview of resources for how to get started with deep learning in R, read Sigrid Keydana’s article and subscribe to the Tensorflow for R blog.

  • Communicate with R Markdown. The R Markdown family of packages enables you to create and share beautiful data science products like books, blogs, websites, and presentations. Experiment with packages like bookdown, distill, and blogdown; each extends R Markdown to help you publish polished websites for sharing your work. If you want to present analyses or visualizations made with R code, consider making your slides with R Markdown using the xaringan package. If you’ve built an R package, the pkgdown package makes it quick and relatively painless to build a website for your package, using all the work you’ve already done to write and document your functions.


Books & packages referenced

Allaire, JJ, Rich Iannone, and Yihui Xie. 2019. Distill: ’R Markdown’ Format for Scientific and Technical Writing. https://github.com/rstudio/distill.

Chollet, François, and J. J. Allaire. 2018. Deep Learning with R. Manning Publications.

Ushey, Kevin, JJ Allaire, and Yuan Tang. 2019. Reticulate: Interface to ’Python’. https://CRAN.R-project.org/package=reticulate.

Wickham, Hadley. 2015. R Packages: Organize, Test, Document, and Share Your Code. O’Reilly Media, Inc. https://r-pkgs.org/.

———. 2019. Advanced R, Second Edition. Chapman; Hall/CRC. https://adv-r.hadley.nz/.

Wickham, Hadley, and Jay Hesselberth. 2018. Pkgdown: Make Static Html Documentation for a Package. https://CRAN.R-project.org/package=pkgdown.

Xie, Yihui. 2019a. Blogdown: Create Blogs and Websites with R Markdown. https://github.com/rstudio/blogdown.

———. 2019b. Bookdown: Authoring Books and Technical Documents with R Markdown. https://github.com/rstudio/bookdown.

———. 2019c. Xaringan: Presentation Ninja. https://github.com/yihui/xaringan.

  Where to next? Catch us on our blog...

Resources
Grab a cheat sheet for your favorite package to help jog your memory for key functions while you work.
The RStudio team writes books to help you use our tools. Most have links to free online versions so you can study up right now.
Hop straight into RStudio Cloud with built-in tutorials — no installations, no setup required. All cloud accounts are free for personal use (login needed).