وبلاگ بلیان

Metaprogramming in R : advanced statistical programming for data science, analysis, and finance

معرفی کتاب «Metaprogramming in R : advanced statistical programming for data science, analysis, and finance» نوشتهٔ Thomas Mailund (auth.) و Thomas Mailund (auth.)، منتشرشده توسط نشر Apress Imprint : Apress در سال 2017. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.

Learn how to manipulate functions and expressions to modify how the R language interprets itself. This book is an introduction to metaprogramming in the R language, so you will write programs to manipulate other programs. __Metaprogramming in R__ shows you how to treat code as data that you can generate, analyze, or modify. R is a very high-level language where all operations are functions and all functions are data that can be manipulated. This book shows you how to leverage R's natural flexibility in how function calls and expressions are evaluated, to create small domain-specific languages to extend R within the R language itself. **What You'll Learn** * Find out about the anatomy of a function in R * Look inside a function call * Work with R expressions and environments * Manipulate expressions in R * Use substitutions **Who This Book Is For**Those with at least some experience with R and certainly for those with experience in other programming languages. Contents at a Glance 4 Contents 5 About the Author 7 About the Technical Reviewer 8 Introduction 9 Chapter 1: Anatomy of a Function 10 Manipulating Functions 10 Formals 10 Function Bodies 12 Function Environments 15 Calling a Function 15 Modifying Functions 18 Constructing Functions 22 Chapter 2: Inside a Function Call 25 Getting the Components of the Current Function 25 Accessing Actual Function Parameters 28 Accessing the Calling Scope 36 Chapter 3: Expressions and Environments 42 Expressions 42 Chains of Linked Environments 43 Environments and Function Calls 51 Manipulating Environments 55 Explicitly Creating Environments 58 Environments and Expression Evaluation 61 Chapter 4: Manipulating Expressions 63 The Basics of Expressions 64 Accessing and Manipulating Control Structures 64 Accessing and Manipulating Function Calls 66 Expression Simplification 68 Automatic Differentiation 75 Chapter 5: Working with Substitutions 82 A Little More on Quotes 82 Parsing and Deparsing 83 Substitution 84 Substituting Expressions Held in Variables 86 Substituting Function Arguments 88 Nonstandard Evaluation 90 Nonstandard Evaluation from Inside Functions 92 Writing Macros with NSE 93 Modifying Environments in Evaluations 97 Accessing Promises Using the pryr Package 98 Afterword 103 Index 104 Learn how to manipulate functions and expressions to modify how the R language interprets itself. This book is an introduction to metaprogramming in the R language, so you will write programs to manipulate other programs. Metaprogramming in R shows you how to treat code as data that you can generate, analyze, or modify. R is a very high-level language where all operations are functions and all functions are data that can be manipulated. This book shows you how to leverage R's natural flexibility in how function calls and expressions are evaluated, to create small domain-specific languages to extend R within the R language itself. What You'll Learn Find out about the anatomy of a function in R Look inside a function call Work with R expressions and environments Manipulate expressions in R Use substitutions Who This Book Is For Those with at least some experience with R and certainly for those with experience in other programming languages. Learn how to manipulate functions and expressions to modify how the R language interprets itself. This book is an introduction to metaprogramming in the R language, so you will write programs to manipulate other programs. Metaprogramming in R shows you how to treat code as data that you can generate, analyze, or modify. R is a very high-level language where all operations are functions and all functions are data that can be manipulated. This book shows you how to leverage R's natural flexibility in how function calls and expressions are evaluated, to create small domain-specific languages to extend R within the R language itself. You will: Find out about the anatomy of a function in R Look inside a function call Work with R expressions and environments Manipulate expressions in R Use substitutions Front Matter....Pages i-xi Anatomy of a Function....Pages 1-15 Inside a Function Call....Pages 17-33 Expressions and Environments....Pages 35-55 Manipulating Expressions....Pages 57-75 Working with Substitutions....Pages 77-97 Back Matter....Pages 99-103
دانلود کتاب Metaprogramming in R : advanced statistical programming for data science, analysis, and finance