did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780521872652

A First Course in Statistical Programming with R

by
  • ISBN13:

    9780521872652

  • ISBN10:

    0521872650

  • Format: Hardcover
  • Copyright: 2008-01-28
  • Publisher: Cambridge University Press
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $112.99 Save up to $48.86
  • Digital
    $64.13
    Add to Cart

    DURATION
    PRICE

Supplemental Materials

What is included with this book?

Summary

This is the only introduction you'll need to start programming in R, the open-source language that is free to download, and lets you adapt the source code for your own requirements. Co-written by one of the R Core Development Team, and by an established R author, this book comes with real R code that complies with the standards of the language. Unlike other introductory books on the ground-breaking R system, this book emphasizes programming, including the principles that apply to most computing languages, and techniques used to develop more complex projects. Learning the language is made easier by the frequent exercises and end-of-chapter reviews that help you progress confidently through the book. Solutions, datasets and any errata will be available from the book's web site. The many examples, all from real applications, make it particularly useful for anyone working in practical data analysis.

Table of Contents

Prefacep. ix
Getting startedp. 1
What is statistical programming?p. 1
Outline of the bookp. 2
The R packagep. 3
Why use a command line?p. 3
Font conventionsp. 4
Installation of Rp. 4
Introduction to the R languagep. 5
Starting and quitting Rp. 5
Recording your workp. 6
Basic features of Rp. 7
Calculating with Rp. 7
Named storagep. 7
Functionsp. 9
Exact or approximate?p. 9
R is case-sensitivep. 12
Listing the objects in the workspacep. 12
Vectorsp. 12
Extracting elements from vectorsp. 13
Vector arithmeticp. 14
Simple patterned vectorsp. 15
Missing values and other special valuesp. 16
Character vectorsp. 16
Factorsp. 17
More on extracting elements from vectorsp. 18
Matrices and arraysp. 18
Data framesp. 19
Dates and timesp. 21
Built-in functions and online helpp. 21
Built-in examplesp. 22
Finding help when you don't know the function namep. 23
Built-in graphics functionsp. 23
Additional elementary built-in functionsp. 25
Logical vectors and relational operatorsp. 26
Boolean algebrap. 26
Logical operations in Rp. 27
Relational operatorsp. 28
Data input and outputp. 29
Changing directoriesp. 29
dump () and source ()p. 29
Redirecting R outputp. 30
Saving and retrieving image filesp. 31
Data frames and the read.table functionp. 31
Listsp. 31
Chapter exercisesp. 32
Programming statistical graphicsp. 33
High-level plotsp. 33
Bar charts and dot chartsp. 34
Pie chartsp. 35
Histogramsp. 35
Box plotsp. 36
Scatterplotsp. 38
QQ plotsp. 39
Choosing a high-level graphicp. 41
Low-level graphics functionsp. 42
The plotting region and marginsp. 42
Adding to plotsp. 43
Setting graphical parametersp. 45
Chapter exercisesp. 46
Programming with Rp. 47
Flow controlp. 47
The for () loopp. 47
The if () statementp. 50
The while () loopp. 54
Newton's method for root findingp. 55
The repeat loop, and the break and next statementsp. 57
Managing complexity through functionsp. 59
What are functions?p. 59
Scope of variablesp. 62
Miscellaneous programming tipsp. 63
Using fix ()p. 63
Documentation using #p. 64
Some general programming guidelinesp. 65
Top-down designp. 67
Debugging and maintenancep. 72
Recognizing that a bug existsp. 72
Make the bug reproduciblep. 73
Identify the cause of the bugp. 73
Fixing errors and testingp. 75
Look for similar errors elsewherep. 75
The browser () and debug () functionsp. 75
Efficient programmingp. 77
Learn your toolsp. 77
Use efficient algorithmsp. 78
Measure the time your program takesp. 79
Be willing to use different toolsp. 80
Optimize with carep. 80
Chapter exercisesp. 80
Simulationp. 82
Monte Carlo simulationp. 82
Generation of pseudorandom numbersp. 83
Simulation of other random variablesp. 88
Bernoulli random variablesp. 88
Binomial random variablesp. 89
Poisson random variablesp. 93
Exponential random numbersp. 97
Normal random variablesp. 99
Monte Carlo integrationp. 101
Advanced simulation methodsp. 104
Rejection samplingp. 104
Importance samplingp. 107
Chapter exercisesp. 109
Computational linear algebrap. 112
Vectors and matrices in Rp. 113
Constructing matrix objectsp. 113
Accessing matrix elements; row and column namesp. 115
Matrix propertiesp. 117
Triangular matricesp. 118
Matrix arithmeticp. 118
Matrix multiplication and inversionp. 119
Matrix inversionp. 120
The LU decompositionp. 121
Matrix inversion in Rp. 122
Solving linear systemsp. 123
Eigenvalues and eigenvectorsp. 124
Advanced topicsp. 125
The singular value decomposition of a matrixp. 125
The Choleski decomposition of a positive definite matrixp. 126
The QR decomposition of a matrixp. 127
The condition number of a matrixp. 128
Outer productsp. 129
Kronecker productsp. 129
apply ()p. 129
Chapter exercisesp. 130
Numerical optimizationp. 132
The golden section search methodp. 132
Newton-Raphsonp. 135
The Nelder-Mead simplex methodp. 138
Built-in functionsp. 142
Linear programmingp. 142
Solving linear programming problems in Rp. 145
Maximization and other kinds of constraintsp. 145
Special situationsp. 146
Unrestricted variablesp. 149
Integer programmingp. 150
Alternatives to lp ()p. 151
Quadratic programmingp. 151
Chapter exercisesp. 157
Review of random variables and distributionsp. 158
Indexp. 161
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program