
Advanced R
by Hadley Wickham · first published 2014
69% recommend31% neutral
Why HN recommends it
Explains how R works under the hood (scoping, vectors vs lists, classes, metaprogramming, performance), so R's odd behavior makes sense. Suits programmers coming from other languages, less so first-time R learners.
Summarised by Claude from recommending comments
Advanced R presents useful tools and techniques for attacking many types of R programming problems, helping you avoid mistakes and dead ends. With more than ten years of experience programming in R, the author illustrates the elegance, beauty, and flexibility at the heart of R. The book develops the necessary skills to produce quality code that can be used in a variety of circumstances. You will learn: The fundamentals of R, including standard data types and functions Functional programming as a useful framework for solving wide classes of problems The positives and negatives of metapr
Affiliate links. As an Amazon Associate I earn from qualifying purchases.

I agree with everything here, including the praise for Matloff's book; it should be the very first book any serious R user picks up. But Matloff is no longer alone: Hadley Wickham's Advanced R is now also a must-read for R programmers. http://www.amazon.com/Advanced-Chapman-Hall-CRC-Series/dp/14...
on “R, the master troll of statistical languages (2012)” ↗The "Metaprogramming" section of Advanced R by Hadley Wickham is a good introduction, although it emphasizes the author's own library and their own (intelligent but opinionated) approach, rather than the core language primitives: https://adv-r.hadley.nz/metaprogramming.html…
on “Lisp-stat: An environment for Statistical Computing” ↗Does anyone have a short list of the best sites to learn R? I only have two on my list, and one is for advanced users: http://adv-r.had.co.nz - Advanced R by Hadley Wickham https://learnxinyminutes.com/docs/r/ I keep my links on Github: https://github.com/melling/ComputerLanguages/blob/master/r.o...
on “Announcing R Tools for Visual Studio” ↗…another example of R's lispiness in action [0]. Also, consider how easy it is to walk R's S-exp. Expressions in R can only be one of four things: an atomic value, a name, a call or a pairlist. Wickham's Advanced R has a great intro on this [1]. I believe Wickham's amazing work with tidyverse (which really changes the way you code in R) is just the beginning of a rediscovery of R's inner lisp power, a kind of "R:…
on “Introduction to R Programming” ↗If you already know another dynamic language and want to understand R, I would recommend skipping all the intros to R based around data analysis and start with Advanced R by Hadley Wickham. It will explain all the weirdness you'll encounter right up front before it confuses you. Then you can read the data analysis tutorials and focus on the content rather than the R weirdness.
on “Learn R Through Examples (2020)” ↗…(beginner and advanced). Even if it's correct, what's the point in showing esoteric examples unless this tutorial is meant to teach R to someone interested in the design of languages? Again, Wickham's Advanced R book handles this topic well (in fact, Advanced R is probably the best book you can read if you already know how to program -- it is incredibly accessible) in his early chapter on Data structures: http://adv-r.had.co.nz/Data-structures.html…
on “15 Page Tutorial for R” ↗One thing I'd add to the section on "Coming from another language" [0] is a brief introduction to non-standard-evaluation. Hadley Wickham's Advanced R (free to read on the Web) has a nice section on it: http://adv-r.had.co.nz/Computing-on-the-language.html NSE is what allows these two statements to both work: library('ggplot2') and: library(ggplot2) It's…
on “Impatient R” ↗An "R for programmers" style book is Hadley Wickham's glorious "Advanced R" (available at http://adv-r.had.co.nz/). R never made too much sense to me till I read through this. Reccomended.
on “The R language, for programmers” ↗I think GitHub is being more popular among "non-developers" because version control is beneficial for all sorts of projects. My favorite example of a "non-programming" project is Hadley Wickham's Advanced R book (http://adv-r.had.co.nz) which is hosted on GitHub and powered by Jekyll, knitr, and pandoc. I hope more authors decide to publish this way.
on “Open Guide to Equity Compensation” ↗There is also ”Advanced R” by Wickham, that goes into more technical details on how the language itself works (and datastructures, etc). It is also available for free.
on “What's Next for R?” ↗FWIW, R started to make sense to me (as a programmer) once I read Advanced R by Wickham.
on “Complexity is a source of income in open source ecosystems (2019)” ↗Advanced R (Chapman & Hall/CRC The R Series) by Hadley Wickham http://www.amazon.com/dp/1466586966/ How is the book compared to the site?
on “Advanced R by Hadley Wickham” ↗…has written bookdown for authoring books with rmarkdown. It's not for authoring statistical papers (as the other comments stated - that's rmarkdown's realm) it's for books like Hadley Wickham's R4DS and Advanced R. Other examples can be found on the bookdown website. I'd also add that, regardless of inserting R code, bookdown is a class authoring format and personally I would write a book or large document in…
on “Bookdown – Authoring Books and Technical Documents with R Markdown” ↗Hadley Wickham also has an Advanced R book [0] which has some of the functional programming concepts that you can use in R [0]: http://adv-r.had.co.nz/
on “Introduction to R Programming” ↗…frustration with a project I'm working on, yesterday I stumbled across using data.frame instead of cbind. Are you maybe Hadley Wickham? If yes, you probably already know this :-) My brother bought me "Advanced R" for Christmas. edit: data.frame, not read.table
on “Introduction to Statistical Learning, with Applications in R” ↗