Advanced R Solutions 1032007508, 9781032007502

"I learned a lot working through their solutions -- it's a great way to broaden and deepen your understanding

393 81 5MB

English Pages 304 [302] Year 2021

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Cover
Half Title
Series Page
Title Page
Copyright Page
Dedication
Contents
Preface
I. Foundations
2. Names and values
2.2. Binding basics
2.3. Copy-on-modify
2.4. Object size
2.5. Modify-in-place
3. Vectors
3.2. Atomic vectors
3.3. Attributes
3.4. S3 atomic vectors
3.5. Lists
3.6. Data frames and tibbles
4. Subsetting
4.2. Selecting multiple elements
4.3. Selecting a single element
4.5. Applications
5. Control flow
5.2. Choices
5.3. Loops
6. Functions
6.2. Function fundamentals
6.4. Lexical scoping
6.5. Lazy evaluation
6.6. . . . (dot-dot-dot)
6.7. Exiting a function
6.8. Function forms
7. Environments
7.2. Environment basics
7.3. Recursing over environments
7.4. Special environments
7.5. Call stacks
8. Conditions
8.2. Signalling conditions
8.4. Handling conditions
8.5. Custom conditions
8.6. Applications
II. Functional programming
9. Functionals
9.2. My first functional: map()
9.4. Map variants
9.6. Predicate functionals
9.7. Base functionals
10. Function factories
10.2. Factory fundamentals
10.3. Graphical factories
10.4. Statistical factories
10.5. Function factories + functionals
11. Function operators
11.2. Existing function operators
11.3. Case study: Creating your own function operators
III. Object-oriented programming
13. S3
13.2. Basics
13.3. Classes
13.4. Generics and methods
13.5. Object styles
13.6. Inheritance
13.7. Dispatch details
14. R6
14.2. Classes and methods
14.3. Controlling access
14.4. Reference semantics
15. S4
15.2. Basics
15.3. Classes
15.4. Generics and methods
15.5. Method dispatch
15.6. S4 and S3
IV. Metaprogramming
18. Expressions
18.2. Abstract syntax trees
18.3. Expressions
18.4. Parsing and grammar
18.5. Walking AST with recursive functions
19. Quasiquotation
19.2. Motivation
19.3. Quoting
19.4. Unquoting
19.6. . . . (dot-dot-dot)
19.7. Case studies
20. Evaluation
20.2. Evaluation basics
20.3. Quosures
20.4. Data masks
20.5. Using tidy evaluation
20.6. Base evaluation
21. Translating R code
21.2. HTML
21.3. LaTeX
V. Techniques
23. Measuring performance
23.2. Profiling
23.3. Microbenchmarking
24. Improving performance
24.3. Checking for existing solutions
24.4. Doing as little as possible
24.5. Vectorise
25. Rewriting R code in C++
25.2. Getting started with C++
25.4. Missing values
25.5. Standard Template Library
Bibliography

Advanced R Solutions
 1032007508, 9781032007502

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Recommend Papers