Books & Videos

Table of Contents

  1. Chapter 1 Getting Started

    1. How to Run R

    2. A First R Session

    3. Introduction to Functions

    4. Preview of Some Important R Data Structures

    5. Extended Example: Regression Analysis of Exam Grades

    6. Startup and Shutdown

    7. Getting Help

  2. Chapter 2 Vectors

    1. Scalars, Vectors, Arrays, and Matrices

    2. Declarations

    3. Recycling

    4. Common Vector Operations

    5. Using all() and any()

    6. Vectorized Operations

    7. NA and NULL Values

    8. Filtering

    9. A Vectorized if-then-else: The ifelse() Function

    10. Testing Vector Equality

    11. Vector Element Names

    12. More on c()

  3. Chapter 3 Matrices and Arrays

    1. Creating Matrices

    2. General Matrix Operations

    3. Applying Functions to Matrix Rows and Columns

    4. Adding and Deleting Matrix Rows and Columns

    5. More on the Vector/Matrix Distinction

    6. Avoiding Unintended Dimension Reduction

    7. Naming Matrix Rows and Columns

    8. Higher-Dimensional Arrays

  4. Chapter 4 Lists

    1. Creating Lists

    2. General List Operations

    3. Accessing List Components and Values

    4. Applying Functions to Lists

    5. Recursive Lists

  5. Chapter 5 Data Frames

    1. Creating Data Frames

    2. Other Matrix-Like Operations

    3. Merging Data Frames

    4. Applying Functions to Data Frames

  6. Chapter 6 Factors and Tables

    1. Factors and Levels

    2. Common Functions Used with Factors

    3. Working with Tables

    4. Other Factor- and Table-Related Functions

  7. Chapter 7 R Programming Structures

    1. Control Statements

    2. Arithmetic and Boolean Operators and Values

    3. Default Values for Arguments

    4. Return Values

    5. Functions Are Objects

    6. Environment and Scope Issues

    7. No Pointers in R

    8. Writing Upstairs

    9. Recursion

    10. Replacement Functions

    11. Tools for Composing Function Code

    12. Writing Your Own Binary Operations

    13. Anonymous Functions

  8. Chapter 8 Doing Math and Simulations in R

    1. Math Functions

    2. Functions for Statistical Distributions

    3. Sorting

    4. Linear Algebra Operations on Vectors and Matrices

    5. Set Operations

    6. Simulation Programming in R

  9. Chapter 9 Object-Oriented Programming

    1. S3 Classes

    2. S4 Classes

    3. S3 Versus S4

    4. Managing Your Objects

  10. Chapter 10 Input/Output

    1. Accessing the Keyboard and Monitor

    2. Reading and Writing Files

    3. Accessing the Internet

  11. Chapter 11 String Manipulation

    1. An Overview of String-Manipulation Functions

    2. Regular Expressions

    3. Use of String Utilities in the edtdbg Debugging Tool

  12. Chapter 12 Graphics

    1. Creating Graphs

    2. Customizing Graphs

    3. Saving Graphs to Files

    4. Creating Three-Dimensional Plots

  13. Chapter 13 Debugging

    1. Fundamental Principles of Debugging

    2. Why Use a Debugging Tool?

    3. Using R Debugging Facilities

    4. Moving Up in the World: More Convenient Debugging Tools

    5. Ensuring Consistency in Debugging Simulation Code

    6. Syntax and Runtime Errors

    7. Running GDB on R Itself

  14. Chapter 14 Performance Enhancement: Speed and Memory

    1. Writing Fast R Code

    2. The Dreaded for Loop

    3. Functional Programming and Memory Issues

    4. Using Rprof() to Find Slow Spots in Your Code

    5. Byte Code Compilation

    6. Oh No, the Data Doesn’t Fit into Memory!

  15. Chapter 15 Interfacing R to Other Languages

    1. Writing C/C++ Functions to Be Called from R

    2. Using R from Python

  16. Chapter 16 Parallel R

    1. The Mutual Outlinks Problem

    2. Introducing the snow Package

    3. Resorting to C

    4. General Performance Considerations

    5. Debugging Parallel R Code

  1. Appendix Installing R

    1. Downloading R from CRAN

    2. Installing from a Linux Package Manager

    3. Installing from Source

  2. Appendix Installing and Using Packages

    1. Package Basics

    2. Loading a Package from Your Hard Drive

    3. Downloading a Package from the Web

    4. Listing the Functions in a Package

  3. Colophon