This book offers solutions to all 284 exercises in Advanced R, Second Edition. All the solutions have been carefully documented and made to be as clear and accessible as possible. Working through the exercises and their solutions will give you a deeper understanding of a variety of programming challenges, many of which are relevant to everyday work. This will expand your set of tools on a technical and conceptual level. You will be able to transfer many of the specific programming schemes directly and will discover far more elegant solutions to everyday problems.
- When R creates copies, and how it affects memory usage and code performance
- Everything you could ever want to know about functions
- The differences between calling and exiting handlers
- How to employ functional programming to solve modular tasks
- The motivation, mechanics, usage, and limitations of R's highly pragmatic S3 OO system
- The R6 OO system, which is more like OO programming in other languages
- The rules that R uses to parse and evaluate expressions
- How to use metaprogramming to generate HTML or LaTeX with elegant R code
- How to identify and resolve performance bottlenecks
Part I Foundations
2. Names and values
5. Control Flow
Part II Funtional Programming
10. Function Factories
11. Function Operators
Part III Object oriented programming
Part IV Metaprogramming
21. Translating R Code
Part V Techniques
23. Measuring Performance
24. Improving Performance
25. Rewriting R code in C++
"I learned a lot working through their solutions — it's a great way to broaden and deepen your understanding of R. (I should probably go through it again...)"
- Greg Wilson
"Advance R Solutions is a great educational resource that I can recommend to my students. [. . . ] Advanced R, 2nd Edition and the new Advanced R Solutions constitute a dynamic duo for advancing my student’s knowledge in an orderly manner.
[. . .] I would say that if you’re a data scientists who uses R, then Advanced R Solutions should be part of your professional library. Taking some time to explore the various solutions and expand on them with your own experiments, will only help you hone your skills and increase your knowledge. R is a great programming environment that I enjoy on a daily basis. Having yet another resource like this for deepening my knowledge can only lead to good things."
– insideBIGDATA, Daniel D. Gutierrez