Advanced R helps you understand how R works at a fundamental level. It is designed for R programmers who want to deepen their understanding of the language, and programmers experienced in other languages who want to understand what makes R different and special.
This book will teach you the foundations of R; three fundamental programming paradigms (functional, object-oriented, and metaprogramming); and powerful techniques for debugging and optimising
your code.
By reading this book, you will learn:
The second edition is a comprehensive update:
Hadley Wickham is Chief Scientist at RStudio, an Adjunct Professor at Stanford University and the University of Auckland, and a member of the R Foundation. He is the lead developer of the tidyverse, a collection of R packages, including ggplot2 and dplyr, designed to support data science. He is also the author of R for Data Science (with Garrett Grolemund), R Packages , and ggplot2: Elegant Graphics for Data Analysis .
Who should read this book
What you will get out of this book
What you will not learn
Names and values
Unbinding and the garbage collector
S atomic vectors
Data frames and tibbles
Selecting a single element
Subsetting and assignment
Exiting a function
Recursing over environments
As data structures
II Functional programming
My first functional: map()
Function factories + functionals
Existing function operators
Case study: creating your own function operators
III Object oriented programming
Base vs OO objects
Generics and methods
Classes and methods
Generics and methods
Code can generate code
Evaluation runs code
Customising evaluation with functions
Customising evaluation with data
Abstract syntax trees
Parsing and grammar
Walking the AST with recursive functions
Specialised data structures
Using tidy evaluation
Translating R code
Locate the error
The interactive debugger
Check for existing solutions
Do as little as possible
Case study: t-test
Rewriting R code in C++
Getting started with C++
Using Rcpp in a package
Hadley Wickham is Chief Scientist at RStudio, an Adjunct Professor at Stanford University and the University of Auckland, and a member of the R Foundation. He is the lead developer of the tidyverse, a collection of R packages, including ggplot2 and dplyr, designed to support data science. He is also the author of R for Data Science (with Garrett Grolemund), R Packages , and ggplot2: elegant graphics for data analysis .
"The development of progressive data analysis tools that are technically excellent creates a superior opportunity for us as data science users. The concepts of this book can enhance the overall user experience and increase the likelihood that the developed tools become preferred tools accomplishing the desired purpose. Learning from Wickham's vast experience in R coding improves tools that provide targeted users the ability to be more efficient, clearer R analysis code writers, better debuggers of their own syntax errors, and positioned to enjoy faster performance time. These are many of the advantages I have enjoyed using tidyverse developed by Wickham with the " Advanced R " philosophy." ~ Technometrics
"The book is packed with a ton of information, insights, and knowledge drawn from the author's own experience. The approach will be appreciated by the right audience – the audience that is looking for a deeper understanding of the R language. At times, the writing style reveals a personal reflection of how the author's knowledge of the language has evolved. This is beautiful."
~ISCB News