Advanced R Solutions
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.

Features:

  • 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

1138726591
Advanced R Solutions
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.

Features:

  • 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

54.95 In Stock
Advanced R Solutions

Advanced R Solutions

Advanced R Solutions

Advanced R Solutions

Paperback

$54.95 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores

Related collections and offers


Overview

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.

Features:

  • 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


Product Details

ISBN-13: 9781032007496
Publisher: CRC Press
Publication date: 08/24/2021
Series: Chapman & Hall/CRC The R Series
Pages: 302
Product dimensions: 6.12(w) x 9.19(h) x (d)

About the Author

Malte Grosser is a business mathematician from Hamburg, who has been programming in R regularly since the beginning of his career. He is currently finishing his PhD on machine learning for stroke outcome prediction and develops solutions in business as a data scientist.

Henning Bumann is a psychologist and statistician who enjoys making sense of data and is motivated to build data-driven solutions that are beautiful and meaningful. He prefers free programming tools to support effective and transparent collaboration.

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.

Table of Contents

Preface xi

1 Foundations 1

2 Names and values 3

2.2 Binding basics 3

2.3 Copy-on-modify 5

2.4 Object size 9

2.5 Modify-in-place 13

3 Vectors 17

3.2 Atomic vectors 17

3.3 Attributes 18

3.4 S3 atomic vectors 21

3.5 Lists 23

3.6 Data frames and tibbies 26

4 Subsetting 31

4.2 Selecting multiple elements 31

4.3 Selecting a single element 33

4.5 Applications 35

5 Control flow 37

5.2 Choices 37

5.3 Loops 38

6 Functions 41

6.2 Function fundamentals 41

6.4 Lexical scoping 44

6.5 Lazy evaluation 45

6.6 … (dot-dot-dot) 49

6.7 Exiting a function 51

6.8 Function forms 54

7 Environments 61

7.2 Environment basics 61

7.3 Recursing over environments 65

7.4 Special environments 67

7.5 Call stacks 71

8 Conditions 73

8.2 Signalling conditions 73

8.4 Handling conditions 74

8.5 Custom conditions 78

8.6 Applications 79

II Functional programming 85

9 Functionals 87

9.2 My first functional: map() 87

9.4 Map variants 92

9.6 Predicate functionals 95

9.7 Base functionals 98

10 Function factories 101

10.2 Factory fundamentals 101

10.3 Graphical factories 108

10.4 Statistical factories 108

10.5 Function factories + functionals 113

11 Function operators 115

11.2 Existing function operators 115

11.3 Case study: Creating your own function operators 118

III Object-oriented programming 123

13 S3 125

13.2 Basics 125

13.3 Classes 128

13.4 Generics and methods 133

13.5 Object styles 139

13.6 Inheritance 141

13.7 Dispatch details 144

14 R6 149

14.2 Classes and methods 149

14.3 Controlling access 155

14.4 Reference semantics 159

15 S4 161

15.2 Basics 161

15.3 Classes 162

15.4 Generics and methods 167

15.5 Method dispatch 169

15.6 S4 and S3 171

IV Metaprogramming 175

18 Expressions 177

18.2 Abstract syntax trees 177

18.3 Expressions 181

18.4 Parsing and grammar 184

18.5 Walking AST with recursive functions 190

19 Quasiquotation 195

19.2 Motivation 195

19.3 Quoting 198

19.4 Unquoting 201

19.6 … (dot-dot-dot) 203

19.7 Case studies 205

20 Evaluation 209

20.2 Evaluation basics 209

20.3 Quosures 214

20.4 Data masks 215

20.5 Using tidy evaluation 218

20.6 Base evaluation 219

21 Translating R code 223

21.2 HTML 223

21.3 LaTeX 235

V Techniques 245

23 Measuring performance 247

23.2 Profiling 247

23.3 Microbenchmarking 248

24 Improving performance 253

24.3 Checking for existing solutions 253

24.4 Doing as little as possible 259

24.5 Vectorise 263

25 Rewriting R code in C++ 267

25.2 Getting started with C++ 267

25.4 Missing vaiues 272

25.5 Standard Template Library 276

Bibliography 283

From the B&N Reads Blog

Customer Reviews