Advanced R. V!aylor & Francis Group. Hadley Wickham. ~ CRC Press

Size: px
Start display at page:

Download "Advanced R. V!aylor & Francis Group. Hadley Wickham. ~ CRC Press"

Transcription

1 ~ CRC Press V!aylor & Francis Group Advanced R Hadley Wickham

2 ')'l If trlro r r 1 Introduction Who should read this book What you will get out of this book Meta-techniques Recommended reading Getting help Acknowledgments Conventions Colophon 8 I Foundations 11 2 Data structures Vectors Atomic vectors Types and tests Coercion Lists Exercises Attributes Names Factors Exercises 23

3 nrf'1prinrr flntortor conhco.f"'4-f-;..,...,..'\ X Exercises Data frames Creation Testing and coercion Combining data frames Special columns Exercises Answers Subsetting Data types Atomic vectors Lists Matrices and arrays Data frames S3 objects S4 objects Exercises Subsetting operators Simplifying vs. preserving subsetting $ Missing/ out of bounds indices Exercises Subsetting and assignment Applications Lookup tables (character subsetting) Matching and merging by hand (integer subsetting) Random samples/bootstrap (integer subsetting) 48

4 xi Expanding aggregated counts (integer subsetting) Removing columns from data frames (character subsetting) Selecting rows based on a condition (logical subsetting) Boolean algebra vs. sets (logical & integer subsetting) Exercises Answers 55 4 Vocabulary 4.1 The basics 4.2 Common data structures 4.3 Statistics Working with R 4.5 I/ Style guide 5.1 Notation and naming File names Object names 5.2 Syntax Spacing Curly braces Line length Indentation Assignment 5.3 Organisation Commenting guidelines

5 xii 6 Functions Function components Primitive functions Exercises Lexical scoping Name masking Functions vs. variables A fresh start Dynamic lookup Exercises Every operation is a function call Function arguments Calling functions Calling a function given a list of arguments Default and missing arguments Lazy evaluation Exercises Special calls Infix functions Replacement functions Exercises Return values On exit Exercises Quiz answers.. 98

6 xiii 7 00 field guide Base types Recognising objects, generic functions, and methods Defining classes and creating objects Creating new methods and generics Method dispatch Exercises Recognising objects, generic functions, and methods Defining classes and creating objects Creating new methods and generics Method dispatch Exercises RC Defining classes and creating objects Recognising objects and methods Method dispatch Exercises Picking a system Quiz answers Environments Environment basics Exercises Recursing over environments Exercises Function environments 133

7 Q!) 0111rz ~n~urprs xiv The enclosing environment Binding environments Execution environments Calling environments Exercises Binding names to values Exercises Explicit environments Avoiding copies Package state As a hashmap Quiz answers Debugging, condition handling, and defensive programming Debugging techniques Debugging tools Determining the sequence of calls Browsing on error Browsing arbitrary code The call stack: traceback(), where, and recover() Other types of failure Condition handling Ignore errors with try Handle conditions with trycatch() withcallinghandlers() Custom signal classes Exercises Defensive programming Exercises 169

8 II Functional programming Functional programming Motivation Anonymous functions Exercises Closures Function factories Mutab1e state Exercises Lists of functions Moving lists of functions to the global environment Exercises Case study: numerical integration Exercises XV 11 Functionals My first functional: lapply() Looping patterns Exercises For loop functionals: friends of lapply() Vector output: sapply and vapply Multiple inputs: Map (and mapply) Rolling computations Parallelisation Exercises Manipulating matrices and data frames Matrix and array operations Group apply The plyr package 217

9 xvi Exercises Manipulating lists Reduce() Predicate functionals Exercises Mathematical functionals Exercises Loops that shq,uld be left as is Modifying in place Recursive relationships While loops A family of functions Exercises Function operators Behavioural FOs Memoisation Capturing function invocations Laziness Exercises Output FOs Minor modifications Changing what a function does Exercises Input FOs Prefilling function arguments: partial function application Changing input types Exercises 251

10 xvii III Function composition Logical predicates and boolean algebra Exercises Computing on the language Non-standard evaluation 1301 Capturing expressions Exercises Non-standard evaluation in subset Exercises 1303 Scoping issues Exercises 13.4 Calling from another function Exercises 1305 Substitute Adding an escape hatch to substitute Capturing unevaluated Exercises The downsides of non-standard evaluation Exercises 14 Expressions 1401 Structure of expressions Exercises 1402 Names Exercises 1403 Calls Modifying a call Creating a call from its components

11 xviii Exercises Capturing the current call Exercises Pairlists Exercises Parsing and deparsing Exercises Walking the A..ST with recursive functions Finding F and T Finding all variables created by assignment Modifying the call tree Exercises Domain specific languages HTML Goal Escaping Basic tag functions Tag functions Processing all tags Exercises LaTeX LaTeX mathematics Goal to_math Known symbols Unknown symbols Known functions Unknown functions. 326

12 Byte code compilation 370 xix IV Performance Performance Why is R slow? Micro benchmarking Exercises Language performance Extreme dynamism Name lookup with mutable environments Lazy evaluation overhead Exercises Implementation performance Extracting a single value from a data frame ifelse(), pmin(), and pmax() Exercises Alternative R implementations Optimising code Measuring performance Limitations Improving performance Code organisation Has someone already solved the problem? Exercises Do as little as possible Exercises Vectorise Exercises Avoid copies 368

13 XX 17.9 Case study: t-test Parallelise Other techniques Memory Object size Exercises Memory usage and garbage collection Memory pr~filing with lineprof Exercises Modification in place Loops Exercises High performance functions with Rcpp Getting started with C No inputs, scalar output Scalar input, scalar output Vector input, scalar output Vector input, vector output Matrix input, vector output Using sourcecpp Exercises Attributes and other classes Lists and data frames Functions Other types Missing values Scalars. 410 Integers 410

14 Doubles Strings Boolean Vectors Exercises 19.4 Rcpp sugar Arithmetic and logical operators Logical. summary functions Vector views Other useful functions 19.5 The STL Using iterators Algorithms Data structures Vectors Sets Map Exercises 19.6 Case studies Gibbs sampler R vectorisation vs. C++ vectorisation 19.7 Using Rcpp in a package 19.8 Learning more Acknowledgments 20 R 's C interface 20.1 Calling C functions from R 20.2 C data structures 20.3 Creating and modifying vectors xxi

15 xxii Missing and non-finite values Accessing vector data Character vectors and lists Modifying inputs Coercing scalars Long vectors Pair lists Input valiqation Finding the C source code for a function 447 Index 451

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17 List of Programs xxv List of Figures xxix List of Tables xxxiii Preface to second version xxxv PART 1 Structured Programming 1 1 Getting started 3 1.1 Programming 3 1.2 Editing source code 5 Source code

More information

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix PGJC4_JSE8_OCA.book Page ix Monday, June 20, 2016 2:31 PM Contents Figures Tables Examples Foreword Preface xix xxi xxiii xxvii xxix 1 Basics of Java Programming 1 1.1 Introduction 2 1.2 Classes 2 Declaring

More information

Index. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309

Index. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309 A Arithmetic operation floating-point arithmetic, 11 12 integer numbers, 9 11 Arrays, 97 copying, 59 60 creation, 48 elements, 48 empty arrays and vectors, 57 58 executable program, 49 expressions, 48

More information

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS Contents Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS 1.1. INTRODUCTION TO COMPUTERS... 1 1.2. HISTORY OF C & C++... 3 1.3. DESIGN, DEVELOPMENT AND EXECUTION OF A PROGRAM... 3 1.4 TESTING OF PROGRAMS...

More information

A Web-Based Introduction

A Web-Based Introduction A Web-Based Introduction to Programming Essential Algorithms, Syntax, and Control Structures Using PHP, HTML, and MySQL Third Edition Mike O'Kane Carolina Academic Press Durham, North Carolina Contents

More information

Contents in Detail. Who This Book Is For... xx Using Ruby to Test Itself... xx Which Implementation of Ruby?... xxi Overview...

Contents in Detail. Who This Book Is For... xx Using Ruby to Test Itself... xx Which Implementation of Ruby?... xxi Overview... Contents in Detail Foreword by Aaron Patterson xv Acknowledgments xvii Introduction Who This Book Is For................................................ xx Using Ruby to Test Itself.... xx Which Implementation

More information

6.184 Lecture 4. Interpretation. Tweaked by Ben Vandiver Compiled by Mike Phillips Original material by Eric Grimson

6.184 Lecture 4. Interpretation. Tweaked by Ben Vandiver Compiled by Mike Phillips Original material by Eric Grimson 6.184 Lecture 4 Interpretation Tweaked by Ben Vandiver Compiled by Mike Phillips Original material by Eric Grimson 1 Interpretation Parts of an interpreter Arithmetic calculator

More information

Beginning Perl. Third Edition. Apress. JAMES LEE with SIMON COZENS

Beginning Perl. Third Edition. Apress. JAMES LEE with SIMON COZENS Beginning Perl Third Edition JAMES LEE with SIMON COZENS Apress About the Author... About the Technical Reviewers Acknowledgements Suitrod yetion «. xvi xvii xviii «xix. Chapter 1: First Steps in Perl..

More information

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS STEPHEN WOLFRAM MATHEMATICADO OO Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS Table of Contents XXI a section new for Version 3 a section new for Version 4 a section substantially modified for

More information

Table of Contents. Preface... xxi

Table of Contents. Preface... xxi Table of Contents Preface... xxi Chapter 1: Introduction to Python... 1 Python... 2 Features of Python... 3 Execution of a Python Program... 7 Viewing the Byte Code... 9 Flavors of Python... 10 Python

More information

Excel Programming with VBA (Macro Programming) 24 hours Getting Started

Excel Programming with VBA (Macro Programming) 24 hours Getting Started Excel Programming with VBA (Macro Programming) 24 hours Getting Started Introducing Visual Basic for Applications Displaying the Developer Tab in the Ribbon Recording a Macro Saving a Macro-Enabled Workbook

More information

Chapter 1. Fundamentals of Higher Order Programming

Chapter 1. Fundamentals of Higher Order Programming Chapter 1 Fundamentals of Higher Order Programming 1 The Elements of Programming Any powerful language features: so does Scheme primitive data procedures combinations abstraction We will see that Scheme

More information

Contents I Introduction 1 Introduction to PL/SQL iii

Contents I Introduction 1 Introduction to PL/SQL iii Contents I Introduction Lesson Objectives I-2 Course Objectives I-3 Human Resources (HR) Schema for This Course I-4 Course Agenda I-5 Class Account Information I-6 Appendixes Used in This Course I-7 PL/SQL

More information

JME Language Reference Manual

JME Language Reference Manual JME Language Reference Manual 1 Introduction JME (pronounced jay+me) is a lightweight language that allows programmers to easily perform statistic computations on tabular data as part of data analysis.

More information

C# Programming: From Problem Analysis to Program Design. Fourth Edition

C# Programming: From Problem Analysis to Program Design. Fourth Edition C# Programming: From Problem Analysis to Program Design Fourth Edition Preface xxi INTRODUCTION TO COMPUTING AND PROGRAMMING 1 History of Computers 2 System and Application Software 4 System Software 4

More information

Functional Programming. Pure Functional Programming

Functional Programming. Pure Functional Programming Functional Programming Pure Functional Programming Computation is largely performed by applying functions to values. The value of an expression depends only on the values of its sub-expressions (if any).

More information

"Charting the Course... Java Programming Language. Course Summary

Charting the Course... Java Programming Language. Course Summary Course Summary Description This course emphasizes becoming productive quickly as a Java application developer. This course quickly covers the Java language syntax and then moves into the object-oriented

More information

About the Authors... iii Introduction... xvii. Chapter 1: System Software... 1

About the Authors... iii Introduction... xvii. Chapter 1: System Software... 1 Table of Contents About the Authors... iii Introduction... xvii Chapter 1: System Software... 1 1.1 Concept of System Software... 2 Types of Software Programs... 2 Software Programs and the Computing Machine...

More information

Contents. Chapter 1 SPECIFYING SYNTAX 1

Contents. Chapter 1 SPECIFYING SYNTAX 1 Contents Chapter 1 SPECIFYING SYNTAX 1 1.1 GRAMMARS AND BNF 2 Context-Free Grammars 4 Context-Sensitive Grammars 8 Exercises 8 1.2 THE PROGRAMMING LANGUAGE WREN 10 Ambiguity 12 Context Constraints in Wren

More information

Microsoft. Microsoft Visual C# Step by Step. John Sharp

Microsoft. Microsoft Visual C# Step by Step. John Sharp Microsoft Microsoft Visual C#- 2010 Step by Step John Sharp Table of Contents Acknowledgments Introduction xvii xix Part I Introducing Microsoft Visual C# and Microsoft Visual Studio 2010 1 Welcome to

More information

PYTHON. p ykos vtawynivis. Second eciitiovl. CO Ve, WESLEY J. CHUN

PYTHON. p ykos vtawynivis. Second eciitiovl. CO Ve, WESLEY J. CHUN CO Ve, PYTHON p ykos vtawynivis Second eciitiovl WESLEY J. CHUN. PRENTICE HALL Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Capetown Sydney

More information

Torben./Egidius Mogensen. Introduction. to Compiler Design. ^ Springer

Torben./Egidius Mogensen. Introduction. to Compiler Design. ^ Springer Torben./Egidius Mogensen Introduction to Compiler Design ^ Springer Contents 1 Lexical Analysis 1 1.1 Regular Expressions 2 1.1.1 Shorthands 4 1.1.2 Examples 5 1.2 Nondeterministic Finite Automata 6 1.3

More information

"Charting the Course... Agile Database Design Techniques Course Summary

Charting the Course... Agile Database Design Techniques Course Summary Course Summary Description This course provides students with the skills necessary to design databases using Agile design techniques. It is based on the Scott Ambler book Agile Database Techniques: Effective

More information

Contents Computing with Formulas

Contents Computing with Formulas Contents 1 Computing with Formulas... 1 1.1 The First Programming Encounter: a Formula... 1 1.1.1 Using a Program as a Calculator... 2 1.1.2 About Programs and Programming... 2 1.1.3 Tools for Writing

More information

CHAPTER 1: INTRODUCING C# 3

CHAPTER 1: INTRODUCING C# 3 INTRODUCTION xix PART I: THE OOP LANGUAGE CHAPTER 1: INTRODUCING C# 3 What Is the.net Framework? 4 What s in the.net Framework? 4 Writing Applications Using the.net Framework 5 What Is C#? 8 Applications

More information

Contents. Acknowledgments Parachutes: Coda. About the Author. Presentation Conventions. PART ONE Foundations 1

Contents. Acknowledgments Parachutes: Coda. About the Author. Presentation Conventions. PART ONE Foundations 1 fm01.qxd 5/24/07 11:16 AM Page ix Preface Aims Subject Matter Structure Supplementary Material Acknowledgments Parachutes: Coda About the Author Prologue A Dichotomy of Character Principles of UNIX Programming

More information

PROBLEM SOLVING WITH FORTRAN 90

PROBLEM SOLVING WITH FORTRAN 90 David R. Brooks PROBLEM SOLVING WITH FORTRAN 90 FOR SCIENTISTS AND ENGINEERS Springer Contents Preface v 1.1 Overview for Instructors v 1.1.1 The Case for Fortran 90 vi 1.1.2 Structure of the Text vii

More information

COP4020 Programming Languages. Functional Programming Prof. Robert van Engelen

COP4020 Programming Languages. Functional Programming Prof. Robert van Engelen COP4020 Programming Languages Functional Programming Prof. Robert van Engelen Overview What is functional programming? Historical origins of functional programming Functional programming today Concepts

More information

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 2. true / false ML can be compiled. 3. true / false FORTRAN can reasonably be considered

More information

"Charting the Course to Your Success!" MOC D Querying Microsoft SQL Server Course Summary

Charting the Course to Your Success! MOC D Querying Microsoft SQL Server Course Summary Course Summary Description This 5-day instructor led course provides students with the technical skills required to write basic Transact-SQL queries for Microsoft SQL Server 2014. This course is the foundation

More information

ECE570 Lecture 2: Types and Conventions

ECE570 Lecture 2: Types and Conventions ECE570 Lecture 2: Types and Conventions Jeffrey Mark Siskind School of Electrical and Computer Engineering Fall 2017 Siskind (Purdue ECE) ECE570 Lecture 2: Types and Conventions Fall 2017 1 / 28 Booleans

More information

CSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341)

CSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) CSE 413 Languages & Implementation Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) 1 Goals Representing programs as data Racket structs as a better way to represent

More information

ECE473 Lecture 2: Types and Conventions

ECE473 Lecture 2: Types and Conventions ECE473 Lecture 2: Types and Conventions Jeffrey Mark Siskind School of Electrical and Computer Engineering Spring 2019 Siskind (Purdue ECE) ECE473 Lecture 2: Types and Conventions Spring 2019 1 / 28 Booleans

More information

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery. HTML5/CSS3/JavaScript Programming Course Summary Description This class is designed for students that have experience with basic HTML concepts that wish to learn about HTML Version 5, Cascading Style Sheets

More information

LOGIC AND DISCRETE MATHEMATICS

LOGIC AND DISCRETE MATHEMATICS LOGIC AND DISCRETE MATHEMATICS A Computer Science Perspective WINFRIED KARL GRASSMANN Department of Computer Science University of Saskatchewan JEAN-PAUL TREMBLAY Department of Computer Science University

More information

Object-Oriented Programming and Data Structures

Object-Oriented Programming and Data Structures Java Methods A & AB Object-Oriented Programming and Data Structures Maria Litvin Phillips Academy, Andover, Massachusetts Gary Litvin Skylight Software, Inc. Skylight Publishing Andover, Massachusetts

More information

Organization of Programming Languages CS3200/5200N. Lecture 11

Organization of Programming Languages CS3200/5200N. Lecture 11 Organization of Programming Languages CS3200/5200N Razvan C. Bunescu School of Electrical Engineering and Computer Science bunescu@ohio.edu Functional vs. Imperative The design of the imperative languages

More information

Acknowledgments Introduction. Chapter 1: Introduction to Access 2007 VBA 1. The Visual Basic Editor 18. Testing Phase 24

Acknowledgments Introduction. Chapter 1: Introduction to Access 2007 VBA 1. The Visual Basic Editor 18. Testing Phase 24 Acknowledgments Introduction Chapter 1: Introduction to Access 2007 VBA 1 What Is Access 2007 VBA? 1 What s New in Access 2007 VBA? 2 Access 2007 VBA Programming 101 3 Requirements-Gathering Phase 3 Design

More information

SOME ASSEMBLY REQUIRED

SOME ASSEMBLY REQUIRED SOME ASSEMBLY REQUIRED Assembly Language Programming with the AVR Microcontroller TIMOTHY S. MARGUSH CRC Press Taylor & Francis Group CRC Press is an imprint of the Taylor & Francis Croup an Informa business

More information

Python Scripting for Computational Science

Python Scripting for Computational Science Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures 43 Springer Table of Contents 1 Introduction... 1 1.1 Scripting versus Traditional Programming... 1 1.1.1

More information

Data Structures in C++ Using the Standard Template Library

Data Structures in C++ Using the Standard Template Library Data Structures in C++ Using the Standard Template Library Timothy Budd Oregon State University ^ ADDISON-WESLEY An imprint of Addison Wesley Longman, Inc. Reading, Massachusetts Harlow, England Menlo

More information

Formal Systems and their Applications

Formal Systems and their Applications Formal Systems and their Applications Dave Clarke (Dave.Clarke@cs.kuleuven.be) Acknowledgment: these slides are based in part on slides from Benjamin Pierce and Frank Piessens 1 Course Overview Introduction

More information

Table of Contents at a Glance

Table of Contents at a Glance Table of Contents at a Glance Preface... xix Chapter 1 What Is CL?... 1 Chapter 2 Control Language Command Names... 7 Chapter 3 Command Parameters... 13 Chapter 4 The IBM i User Interface... 25 Chapter

More information

Programming. In Ada JOHN BARNES TT ADDISON-WESLEY

Programming. In Ada JOHN BARNES TT ADDISON-WESLEY Programming In Ada 2005 JOHN BARNES... TT ADDISON-WESLEY An imprint of Pearson Education Harlow, England London New York Boston San Francisco Toronto Sydney Tokyo Singapore Hong Kong Seoul Taipei New Delhi

More information

Microsoft Visual C# Step by Step. John Sharp

Microsoft Visual C# Step by Step. John Sharp Microsoft Visual C# 2013 Step by Step John Sharp Introduction xix PART I INTRODUCING MICROSOFT VISUAL C# AND MICROSOFT VISUAL STUDIO 2013 Chapter 1 Welcome to C# 3 Beginning programming with the Visual

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

Python Scripting for Computational Science

Python Scripting for Computational Science Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures Sprin ger Table of Contents 1 Introduction 1 1.1 Scripting versus Traditional Programming 1 1.1.1 Why Scripting

More information

F# for Scientists. Jon Harrop Flying Frog Consultancy Ltd. Foreword by Don Syme A JOHN WILEY & SONS, INC., PUBLICATION WILEY

F# for Scientists. Jon Harrop Flying Frog Consultancy Ltd. Foreword by Don Syme A JOHN WILEY & SONS, INC., PUBLICATION WILEY F# for Scientists Jon Harrop Flying Frog Consultancy Ltd. Foreword by Don Syme WILEY A JOHN WILEY & SONS, INC., PUBLICATION Preface Acknowledgments List of Figi ares List of Tables Acronyms 1 Introduction

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Organization of Programming Languages Operational Semantics CMSC 330 Summer 2018 1 Formal Semantics of a Prog. Lang. Mathematical description of the meaning of programs written in that language

More information

Mathematics Shape and Space: Polygon Angles

Mathematics Shape and Space: Polygon Angles a place of mind F A C U L T Y O F E D U C A T I O N Department of Curriculum and Pedagogy Mathematics Shape and Space: Polygon Angles Science and Mathematics Education Research Group Supported by UBC Teaching

More information

Summary of Contents LIST OF FIGURES LIST OF TABLES

Summary of Contents LIST OF FIGURES LIST OF TABLES Summary of Contents LIST OF FIGURES LIST OF TABLES PREFACE xvii xix xxi PART 1 BACKGROUND Chapter 1. Introduction 3 Chapter 2. Standards-Makers 21 Chapter 3. Principles of the S2ESC Collection 45 Chapter

More information

R: Control and data flow

R: Control and data flow R: Control and data flow S lawek Staworko Univ. Lille 3 2018, January Outline Expressions Branching expression (if/else) Loops Scope and evaluation Expressions Expressions Functional programming paradigm

More information

Answer any Five Questions. All questions carry equal marks.

Answer any Five Questions. All questions carry equal marks. PART II, PAPER XII (Object Oriented Analysis and Design) 1. What are the benefits of object oriented development over structure development. How one way association is different than two way association.

More information

Installing and Administering a Satellite Environment

Installing and Administering a Satellite Environment IBM DB2 Universal Database Installing and Administering a Satellite Environment Version 8 GC09-4823-00 IBM DB2 Universal Database Installing and Administering a Satellite Environment Version 8 GC09-4823-00

More information

6.037 Lecture 4. Interpretation. What is an interpreter? Why do we need an interpreter? Stages of an interpreter. Role of each part of the interpreter

6.037 Lecture 4. Interpretation. What is an interpreter? Why do we need an interpreter? Stages of an interpreter. Role of each part of the interpreter 6.037 Lecture 4 Interpretation Interpretation Parts of an interpreter Meta-circular Evaluator (Scheme-in-scheme!) A slight variation: dynamic scoping Original material by Eric Grimson Tweaked by Zev Benjamin,

More information

Whom Is This Book For?... xxiv How Is This Book Organized?... xxiv Additional Resources... xxvi

Whom Is This Book For?... xxiv How Is This Book Organized?... xxiv Additional Resources... xxvi Foreword by Bryan Hunter xv Preface xix Acknowledgments xxi Introduction xxiii Whom Is This Book For?... xxiv How Is This Book Organized?... xxiv Additional Resources... xxvi 1 Meet F# 1 F# in Visual Studio...

More information

Acknowledgments Introduction. Part I: Programming Access Applications 1. Chapter 1: Overview of Programming for Access 3

Acknowledgments Introduction. Part I: Programming Access Applications 1. Chapter 1: Overview of Programming for Access 3 74029ftoc.qxd:WroxPro 9/27/07 1:40 PM Page xiii Acknowledgments Introduction x xxv Part I: Programming Access Applications 1 Chapter 1: Overview of Programming for Access 3 Writing Code for Access 3 The

More information

STAT 540: R: Sections Arithmetic in R. Will perform these on vectors, matrices, arrays as well as on ordinary numbers

STAT 540: R: Sections Arithmetic in R. Will perform these on vectors, matrices, arrays as well as on ordinary numbers Arithmetic in R R can be viewed as a very fancy calculator Can perform the ordinary mathematical operations: + - * / ˆ Will perform these on vectors, matrices, arrays as well as on ordinary numbers With

More information

Overview of the Ruby Language. By Ron Haley

Overview of the Ruby Language. By Ron Haley Overview of the Ruby Language By Ron Haley Outline Ruby About Ruby Installation Basics Ruby Conventions Arrays and Hashes Symbols Control Structures Regular Expressions Class vs. Module Blocks, Procs,

More information

Introductory logic and sets for Computer scientists

Introductory logic and sets for Computer scientists Introductory logic and sets for Computer scientists Nimal Nissanke University of Reading ADDISON WESLEY LONGMAN Harlow, England II Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario

More information

Who This Book Is For What This Book Covers How This Book Is Structured What You Need to Use This Book. Source Code

Who This Book Is For What This Book Covers How This Book Is Structured What You Need to Use This Book. Source Code Contents Introduction Who This Book Is For What This Book Covers How This Book Is Structured What You Need to Use This Book Conventions Source Code Errata p2p.wrox.com xxi xxi xxii xxii xxiii xxiii xxiv

More information

CPSC 3740 Programming Languages University of Lethbridge. Data Types

CPSC 3740 Programming Languages University of Lethbridge. Data Types Data Types A data type defines a collection of data values and a set of predefined operations on those values Some languages allow user to define additional types Useful for error detection through type

More information

A Simplified Abstract Syntax for the Dataflow Algebra. A. J. Cowling

A Simplified Abstract Syntax for the Dataflow Algebra. A. J. Cowling Verification and Testing Research Group, Department of Computer Science, University of Sheffield, Regent Court, 211, Portobello Street, Sheffield, S1 4DP, United Kingdom Email: A.Cowling @ dcs.shef.ac.uk

More information

Computer Programming C++ (wg) CCOs

Computer Programming C++ (wg) CCOs Computer Programming C++ (wg) CCOs I. The student will analyze the different systems, and languages of the computer. (SM 1.4, 3.1, 3.4, 3.6) II. The student will write, compile, link and run a simple C++

More information

Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 11 Introduction to PHP

Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 11 Introduction to PHP Chapter 11 Introduction to PHP 11.1 Origin and Uses of PHP Developed by Rasmus Lerdorf in 1994 PHP is a server-side scripting language, embedded in XHTML pages PHP has good support for form processing

More information

Lecture 5: Declarative Programming. The Declarative Kernel Language Machine. September 12th, 2011

Lecture 5: Declarative Programming. The Declarative Kernel Language Machine. September 12th, 2011 Lecture 5: Declarative Programming. The Declarative Kernel Language Machine September 12th, 2011 1 Lecture Outline Declarative Programming contd Dataflow Variables contd Expressions and Statements Functions

More information

"Charting the Course... MOC A Developing Microsoft SQL Server 2012 Databases. Course Summary

Charting the Course... MOC A Developing Microsoft SQL Server 2012 Databases. Course Summary Course Summary Description This 5-day instructor-led course introduces SQL Server 2012 and describes logical table design, indexing and query plans. It also focuses on the creation of database objects

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

Managing Your Biological Data with Python

Managing Your Biological Data with Python Chapman & Hall/CRC Mathematical and Computational Biology Series Managing Your Biological Data with Python Ailegra Via Kristian Rother Anna Tramontano CRC Press Taylor & Francis Group Boca Raton London

More information

Review of the C Programming Language

Review of the C Programming Language Review of the C Programming Language Prof. James L. Frankel Harvard University Version of 11:55 AM 22-Apr-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights reserved. Reference Manual for the

More information

Functional Programming

Functional Programming Functional Programming CS331 Chapter 14 Functional Programming Original functional language is LISP LISt Processing The list is the fundamental data structure Developed by John McCarthy in the 60 s Used

More information

The Scope of This Book... xxii A Quick Note About Browsers and Platforms... xxii The Appendices and Further Resources...xxiii

The Scope of This Book... xxii A Quick Note About Browsers and Platforms... xxii The Appendices and Further Resources...xxiii CONTENTS IN DETAIL FOREWORD by Joost de Valk PREFACE xvii xix INTRODUCTION xxi The Scope of This Book... xxii A Quick Note About Browsers and Platforms... xxii The Appendices and Further Resources...xxiii

More information

"Charting the Course... Oracle 18c PL/SQL (5 Day) Course Summary

Charting the Course... Oracle 18c PL/SQL (5 Day) Course Summary Course Summary Description This course provides a complete, hands-on, comprehensive introduction to PL/SQL including the use of both SQL Developer and SQL*Plus. This coverage is appropriate for both Oracle11g

More information

LECTURE 16. Functional Programming

LECTURE 16. Functional Programming LECTURE 16 Functional Programming WHAT IS FUNCTIONAL PROGRAMMING? Functional programming defines the outputs of a program as a mathematical function of the inputs. Functional programming is a declarative

More information

1 OBJECT-ORIENTED PROGRAMMING 1

1 OBJECT-ORIENTED PROGRAMMING 1 PREFACE xvii 1 OBJECT-ORIENTED PROGRAMMING 1 1.1 Object-Oriented and Procedural Programming 2 Top-Down Design and Procedural Programming, 3 Problems with Top-Down Design, 3 Classes and Objects, 4 Fields

More information

Scheme: Expressions & Procedures

Scheme: Expressions & Procedures Scheme: Expressions & Procedures CS F331 Programming Languages CSCE A331 Programming Language Concepts Lecture Slides Friday, March 31, 2017 Glenn G. Chappell Department of Computer Science University

More information

Functional Programming. Big Picture. Design of Programming Languages

Functional Programming. Big Picture. Design of Programming Languages Functional Programming Big Picture What we ve learned so far: Imperative Programming Languages Variables, binding, scoping, reference environment, etc What s next: Functional Programming Languages Semantics

More information

Pro JavaScript. Development. Coding, Capabilities, and Tooling. Den Odell. Apress"

Pro JavaScript. Development. Coding, Capabilities, and Tooling. Den Odell. Apress Pro JavaScript Development Coding, Capabilities, and Tooling Den Odell Apress" Contents J About the Author About the Technical Reviewers Acknowledgments Introduction xv xvii xix xxi Chapter 1: Object-Oriented

More information

Programming Languages Third Edition

Programming Languages Third Edition Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand

More information

CITY UNIVERSITY OF NEW YORK. Creating a New Project in IRBNet. i. After logging in, click Create New Project on left side of the page.

CITY UNIVERSITY OF NEW YORK. Creating a New Project in IRBNet. i. After logging in, click Create New Project on left side of the page. CITY UNIVERSITY OF NEW YORK Creating a New Project in IRBNet i. After logging in, click Create New Project on left side of the page. ii. Enter the title of the project, the principle investigator s (PI)

More information

Thoughts on Assignment 4 Haskell: Flow of Control

Thoughts on Assignment 4 Haskell: Flow of Control Thoughts on Assignment 4 Haskell: Flow of Control CS F331 Programming Languages CSCE A331 Programming Language Concepts Lecture Slides Monday, February 27, 2017 Glenn G. Chappell Department of Computer

More information

CS 314 Principles of Programming Languages

CS 314 Principles of Programming Languages CS 314 Principles of Programming Languages Lecture 15: Review and Functional Programming Zheng (Eddy) Zhang Rutgers University March 19, 2018 Class Information Midterm exam forum open in Sakai. HW4 and

More information

"Charting the Course... SharePoint 2007 Hands-On Labs Course Summary

Charting the Course... SharePoint 2007 Hands-On Labs Course Summary Course Summary Description This series of 33 hands-on labs allows students to explore the new features of Microsoft SharePoint Server, Microsoft Windows, Microsoft Office, including Microsoft Office Groove,

More information

Programming Languages Third Edition. Chapter 7 Basic Semantics

Programming Languages Third Edition. Chapter 7 Basic Semantics Programming Languages Third Edition Chapter 7 Basic Semantics Objectives Understand attributes, binding, and semantic functions Understand declarations, blocks, and scope Learn how to construct a symbol

More information

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Weiss Chapter 1 terminology (parenthesized numbers are page numbers) Weiss Chapter 1 terminology (parenthesized numbers are page numbers) assignment operators In Java, used to alter the value of a variable. These operators include =, +=, -=, *=, and /=. (9) autoincrement

More information

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims. Lecture 10: Asymptotic Complexity and

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims. Lecture 10: Asymptotic Complexity and CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims Lecture 10: Asymptotic Complexity and What Makes a Good Algorithm? Suppose you have two possible algorithms or

More information

COURSE OF STUDY UNIT PLANNING GUIDE COMPUTER SCIENCE 1 FOR: 5 CREDITS GRADE LEVEL: 9-12 FULL-YEAR COURSE PREPARED BY: SUSIE EISEN

COURSE OF STUDY UNIT PLANNING GUIDE COMPUTER SCIENCE 1 FOR: 5 CREDITS GRADE LEVEL: 9-12 FULL-YEAR COURSE PREPARED BY: SUSIE EISEN COURSE OF STUDY UNIT PLANNING GUIDE FOR: COMPUTER SCIENCE 1 5 CREDITS GRADE LEVEL: 9-12 FULL-YEAR COURSE PREPARED BY: SUSIE EISEN SHANNON WARNOCK, SUPERVISOR OF MATHEMATICS AND SCIENCE JULY 2017 DUMONT

More information

Contents. Introduction

Contents. Introduction Contents Introduction xv Chapter 1. Production Models: Maximizing Profits 1 1.1 A two-variable linear program 2 1.2 The two-variable linear program in AMPL 5 1.3 A linear programming model 6 1.4 The linear

More information

JavaScript. Training Offer for JavaScript Introduction JavaScript. JavaScript Objects

JavaScript. Training Offer for JavaScript Introduction JavaScript. JavaScript Objects JavaScript CAC Noida is an ISO 9001:2015 certified training center with professional experience that dates back to 2005. The vision is to provide professional education merging corporate culture globally

More information

Scenario Manager User Guide. Release September 2013

Scenario Manager User Guide. Release September 2013 Scenario Manager User Guide Release 6.2.1 September 2013 Scenario Manager User Guide Release 6.2.1 September 2013 Document Control Number: 9MN12-62110017 Document Number: SMUG-13-FCCM-0017-6.2.1-01 Oracle

More information

Comp 411 Principles of Programming Languages Lecture 7 Meta-interpreters. Corky Cartwright January 26, 2018

Comp 411 Principles of Programming Languages Lecture 7 Meta-interpreters. Corky Cartwright January 26, 2018 Comp 411 Principles of Programming Languages Lecture 7 Meta-interpreters Corky Cartwright January 26, 2018 Denotational Semantics The primary alternative to syntactic semantics is denotational semantics.

More information

Fundamentals of the Java Programming Language

Fundamentals of the Java Programming Language Fundamentals of the Java Programming Language Student Guide SL-110 REV E D61798GC10 Edition 1.0 2009 D62399 Copyright 2006, 2009, Oracle and/or its affiliates. All rights reserved. Disclaimer This document

More information

SYLLABUS UNIT - I UNIT - II UNIT - III UNIT - IV CHAPTER - 1 : INTRODUCTION CHAPTER - 4 : SYNTAX AX-DIRECTED TRANSLATION TION CHAPTER - 7 : STORA

SYLLABUS UNIT - I UNIT - II UNIT - III UNIT - IV CHAPTER - 1 : INTRODUCTION CHAPTER - 4 : SYNTAX AX-DIRECTED TRANSLATION TION CHAPTER - 7 : STORA Contents i SYLLABUS UNIT - I CHAPTER - 1 : INTRODUCTION Programs Related to Compilers. Translation Process, Major Data Structures, Other Issues in Compiler Structure, Boot Strapping and Porting. CHAPTER

More information

"Charting the Course... MOC A: Developing with the SharePoint Framework. Course Summary

Charting the Course... MOC A: Developing with the SharePoint Framework. Course Summary Course Summary Description This five-day instructor-led course is intended for developers who want to be able to create client-side applications with SharePoint Framework. In this course, students will

More information

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

More information

Preface... 1 The Boost C++ Libraries Overview... 5 Math Toolkit: Special Functions Math Toolkit: Orthogonal Functions... 29

Preface... 1 The Boost C++ Libraries Overview... 5 Math Toolkit: Special Functions Math Toolkit: Orthogonal Functions... 29 Preface... 1 Goals of this Book... 1 Structure of the Book... 1 For whom is this Book?... 1 Using the Boost Libraries... 2 Practical Hints and Guidelines... 2 What s Next?... 2 1 The Boost C++ Libraries

More information

CMSC 330: Organization of Programming Languages. Operational Semantics

CMSC 330: Organization of Programming Languages. Operational Semantics CMSC 330: Organization of Programming Languages Operational Semantics Notes about Project 4, Parts 1 & 2 Still due today (7/2) Will not be graded until 7/11 (along with Part 3) You are strongly encouraged

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Introduction to PTC Windchill ProjectLink 11.0

Introduction to PTC Windchill ProjectLink 11.0 Introduction to PTC Windchill ProjectLink 11.0 Overview Course Code Course Length TRN-4756-T 8 Hours In this course, you will learn how to participate in and manage projects using Windchill ProjectLink

More information

11/6/17. Functional programming. FP Foundations, Scheme (2) LISP Data Types. LISP Data Types. LISP Data Types. Scheme. LISP: John McCarthy 1958 MIT

11/6/17. Functional programming. FP Foundations, Scheme (2) LISP Data Types. LISP Data Types. LISP Data Types. Scheme. LISP: John McCarthy 1958 MIT Functional programming FP Foundations, Scheme (2 In Text: Chapter 15 LISP: John McCarthy 1958 MIT List Processing => Symbolic Manipulation First functional programming language Every version after the

More information