R in a Nutshell
Publisher: O'Reilly Media
Release Date: January 2010
Pages: 636
Read on Safari with a 10day trial
Start your free trial now Buy on AmazonWhere’s the cart? Now you can get everything on Safari. To purchase books, visit Amazon or your favorite retailer. Questions? See our FAQ or contact customer service:
18008898969 / 7078277019
support@oreilly.com
Why learn R? Because it's rapidly becoming the standard for developing statistical software. R in a Nutshell provides a quick and practical way to learn this increasingly popular open source language and environment. You'll not only learn how to program in R, but also how to find the right usercontributed R packages for statistical modeling, visualization, and bioinformatics.
The author introduces you to the R environment, including the R graphical user interface and console, and takes you through the fundamentals of the objectoriented R language. Then, through a variety of practical examples from medicine, business, and sports, you'll learn how you can use this remarkable tool to solve your own data analysis problems.
 Understand the basics of the language, including the nature of R objects
 Learn how to write R functions and build your own packages
 Work with data through visualization, statistical analysis, and other methods
 Explore the wealth of packages contributed by the R community
 Become familiar with the lattice graphics package for highlevel data visualization
 Learn about bioinformatics packages provided by Bioconductor
"I am excited about this book. R in a Nutshell is a great introduction to R, as well as a comprehensive reference for using R in data analytics and visualization. Adler provides 'real world' examples, practical advice, and scripts, making it accessible to anyone working with data, not just professional statisticians."
Table of Contents

R Basics

Chapter 1 Getting and Installing R
 R Versions
 Getting and Installing Interactive R Binaries

Chapter 2 The R User Interface
 The R Graphical User Interface
 The R Console
 Batch Mode
 Using R Inside Microsoft Excel
 Other Ways to Run R

Chapter 3 A Short R Tutorial
 Basic Operations in R
 Functions
 Variables
 Introduction to Data Structures
 Objects and Classes
 Models and Formulas
 Charts and Graphics
 Getting Help

Chapter 4 R Packages
 An Overview of Packages
 Listing Packages in Local Libraries
 Loading Packages
 Exploring Package Repositories
 Custom Packages


The R Language

Chapter 5 An Overview of the R Language
 Expressions
 Objects
 Symbols
 Functions
 Objects Are Copied in Assignment Statements
 Everything in R Is an Object
 Special Values
 Coercion
 The R Interpreter
 Seeing How R Works

Chapter 6 R Syntax
 Constants
 Operators
 Expressions
 Control Structures
 Accessing Data Structures
 R Code Style Standards

Chapter 7 R Objects
 Primitive Object Types
 Vectors
 Lists
 Other Objects
 Attributes

Chapter 8 Symbols and Environments
 Symbols
 Working with Environments
 The Global Environment
 Environments and Functions
 Exceptions

Chapter 9 Functions
 The Function Keyword
 Arguments
 Return Values
 Functions As Arguments
 Argument Order and Named Arguments
 Side Effects

Chapter 10 ObjectOriented Programming
 Overview of ObjectOriented Programming in R
 ObjectOriented Programming in R: S4 Classes
 OldSchool OOP in R: S3

Chapter 11 HighPerformance R
 Use Builtin Math Functions
 Use Environments for Lookup Tables
 Use a Database to Query Large Data Sets
 Preallocate Memory
 Monitor How Much Memory You Are Using
 Functions for Big Data Sets
 Parallel Computation with R
 HighPerformance R Binaries


Working with Data

Chapter 12 Saving, Loading, and Editing Data
 Entering Data Within R
 Saving and Loading R Objects
 Importing Data from External Files
 Exporting Data
 Importing Data from Databases

Chapter 13 Preparing Data
 Combining Data Sets
 Transformations
 Binning Data
 Subsets
 Summarizing Functions
 Data Cleaning
 Finding and Removing Duplicates
 Sorting

Chapter 14 Graphics
 An Overview of R Graphics
 Graphics Devices
 Customizing Charts

Chapter 15 Lattice Graphics
 History
 An Overview of the Lattice Package
 HighLevel Lattice Plotting Functions
 Customizing Lattice Graphics
 LowLevel Functions


Statistics with R

Chapter 16 Analyzing Data
 Summary Statistics
 Correlation and Covariance
 Principal Components Analysis
 Factor Analysis
 Bootstrap Resampling

Chapter 17 Probability Distributions
 Normal Distribution
 Common DistributionType Arguments
 Distribution Function Families

Chapter 18 Statistical Tests
 Continuous Data
 Discrete Data

Chapter 19 Power Tests
 Experimental Design Example
 tTest Design
 Proportion Test Design
 ANOVA Test Design

Chapter 20 Regression Models
 Example: A Simple Linear Model
 Details About the lm Function
 Subset Selection and Shrinkage Methods
 Nonlinear Models
 Survival Models
 Smoothing
 Machine Learning Algorithms for Regression

Chapter 21 Classification Models
 Linear Classification Models
 Machine Learning Algorithms for Classification

Chapter 22 Machine Learning
 Market Basket Analysis
 Clustering

Chapter 23 Time Series Analysis
 Autocorrelation Functions
 Time Series Models

Chapter 24 Bioconductor
 An Example
 Key Bioconductor Packages
 Data Structures
 Where to Go Next


Appendix R Reference

base

boot

class

cluster

codetools

foreign

grDevices

graphics

grid

KernSmooth

lattice

MASS

methods

mgcv

nlme

nnet

rpart

spatial

splines

stats

stats4

survival

tcltk

tools

utils


Bibliography

Colophon