Preface |
Introduction / 1: |
Why R? / 1.1: |
Who should read this book / 1.2: |
What you will get out of this book / 1.3: |
What you will not learn / 1.4: |
Meta-techniques / 1.5: |
Recommended reading / 1.6: |
Getting help / 1.7: |
Acknowledgments / 1.8: |
Conventions / 1.9: |
Colophon / 1.10: |
Foundations / I: |
Names and values / 2: |
Binding basics / 2.1: |
Copy-on-modify / 2.3: |
Object size / 2.4: |
Modify-in-place / 2.5: |
Unbinding and the garbage collector / 2.6: |
Quiz answers / 2.7: |
Vectors / 3: |
Atomic vectors / 3.1: |
Attributes / 3.3: |
S3 atomic vectors / 3.4: |
Lists / 3.5: |
Data frames and tibbles / 3.6: |
Null / 3.7: |
Subsetting / 3.8: |
Selecting multiple elements / 4.1: |
Selecting a single element / 4.3: |
Subsetting and assignment / 4.4: |
Applications / 4.5: |
Control flow / 4.6: |
Choices / 5.1: |
Loops / 5.3: |
Functions / 5.4: |
Function fundamentals / 6.1: |
Function composition / 6.3: |
Lexical scoping / 6.4: |
Lazy evaluation / 6.5: |
… (dot-dot-dot) / 6.6: |
Exiting a function / 6.7: |
Function forms / 6.8: |
Environments / 6.9: |
Environment basics / 7.1: |
Recursing over environments / 7.3: |
Special environments / 7.4: |
Call stacks / 7.5: |
As data structures / 7.6: |
Conditions / 7.7: |
Signalling conditions / 8.1: |
Ignoring conditions / 8.3: |
Handling conditions / 8.4: |
Custom conditions / 8.5: |
Functional programming / 8.6: |
Functional / 9: |
My first functional: map() / 9.1: |
Purrr style / 9.3: |
Map variants / 9.4: |
Reduce family / 9.5: |
Predicate functionals / 9.6: |
Base functionals / 9.7: |
Function factories / 10: |
Factory fundamentals / 10.1: |
Graphical factories / 10.3: |
Statistical factories / 10.4: |
Function factories + functionals / 10.5: |
Function operators / 11: |
Existing function operators / 11.1: |
Case study: Creating your own function operators / 11.3: |
Object-oriented programming / III: |
Base types / 12: |
Base versus OO objects / 12.1: |
S3 / 12.3: |
Basics / 13.1: |
Classes / 13.3: |
Generics and methods / 13.4: |
Object styles / 13.5: |
Inheritance / 13.6: |
Dispatch details / 13.7: |
R6 / 14: |
Classes and methods / 14.1: |
Controlling access / 14.3: |
Reference semantics / 14.4: |
Why R6? / 14.5: |
S4 / 15: |
Method dispatch / 15.1: |
S4 and S3 / 15.6: |
Trade-offs / 16: |
S4 versus S3 / 16.1: |
R6 versus S3 / 16.3: |
Metaprogramming / IV: |
Bis picture / 17: |
Code is data / 17.1: |
Code is a tree / 17.3: |
Code can generate code / 17.4: |
Evaluation runs code / 17.5: |
Customising evaluation with functions / 17.6: |
Customising evaluation with data / 17.7: |
Quosures / 17.8: |
Expressions / 18: |
Abstract syntax trees / 18.1: |
Parsing and grammar / 18.3: |
Walking AST with recursive functions / 18.5: |
Specialised data structures / 18.6: |
Quasiquotation / 19: |
Motivation / 19.1: |
Quoting / 19.3: |
Unquoting / 19.4: |
Non-quoting / 19.5: |
Case studies / 19.6: |
History / 19.8: |
Evaluation / 20: |
Evaluation basics / 20.1: |
Data masks / 20.3: |
Using tidy evaluation / 20.5: |
Base evaluation / 20.6: |
Translating R code / 21: |
HTML / 21.1: |
LaTeX / 21.3: |
Techniques / V: |
Debugging / 22: |
Overall approach / 22.1: |
Locating errors / 22.3: |
Interactive debugger / 22.4: |
Non-interactive debugging / 22.5: |
Non-error failures / 22.6: |
Measuring performance / 23: |
Profiling / 23.1: |
Microbenchmarking / 23.3: |
Improving performance / 24: |
Code organisation / 24.1: |
Checking for existing solutions / 24.3: |
Doing as little as possible / 24.4: |
Vectorise / 24.5: |
Avoiding copies / 24.6: |
Case study: t-test / 24.7: |
Other techniques / 24.8: |
Rewriting R code in C++ / 25: |
Getting started with C++ / 25.1: |
Other classes / 25.3: |
Missing values / 25.4: |
Standard Template Library / 25.5: |
Using Repp in a package / 25.6: |
Learning more / 25.8: |
Bibliography / 25.9: |
Index |
NULL |
Subletting |
Function factories + functional |
Big picture |