Introduction / 1: |
Why Learn R? / 1.1: |
Is R Accurate? / 1.2: |
What About Tech Support? / 1.3: |
The Five Main Parts of SAS and SPSS / 2: |
Programming Conventions / 3: |
Typographic Conventions / 4: |
Installing and Updating R / 5: |
Installing Add-on Packages / 5.1: |
Loading an Add-on Package / 5.2: |
Updating Your Installation / 5.3: |
Uninstalling R / 5.4: |
Choosing Repositories / 5.5: |
Accessing Data in Packages / 5.6: |
Running R / 6: |
Running R Interactively on Windows / 6.1: |
Running R Interactively on Macintosh / 6.2: |
Running R Interactively on Linux or UNIX / 6.3: |
Running Programs that Include Other Programs / 6.4: |
Running R in Batch Mode / 6.5: |
Running R from SPSS / 6.6: |
Graphical User Interfaces / 6.7: |
R Commander / 6.7.1: |
Rattle for Data Mining / 6.7.2: |
JGR Java GUI for R / 6.7.3: |
Help and Documentation / 7: |
Help Files / 7.1: |
Starting Help / 7.2: |
Help Examples / 7.3: |
Help for Functions that Call Other Functions / 7.4: |
Help for Packages / 7.5: |
Help for Datasets / 7.6: |
Books and Manuals / 7.7: |
E-mail Lists / 7.8: |
Searching the Web / 7.9: |
Vignettes / 7.10: |
Programming Language Basics / 8: |
Simple Calculations / 8.1: |
Data Structures / 8.2: |
Vectors / 8.2.1: |
Factors / 8.2.2: |
Data Frames / 8.2.3: |
Matrices / 8.2.4: |
Arrays / 8.2.5: |
Lists / 8.2.6: |
Saving Your Work So Far / 8.3: |
Comments to Document Your Programs / 8.4: |
Controlling Functions (Procedures) / 8.5: |
Controlling Functions with Arguments / 8.5.1: |
Controlling Functions with Formulas / 8.5.2: |
Controlling Functions with an Object's Class / 8.5.3: |
Controlling Functions with Extractor Functions - ODS, OMS / 8.5.4: |
How Much Output Is There? / 8.5.5: |
Writing Your Own Functions (Macros) / 8.5.6: |
Data Acquisition / 9: |
The R Data Editor / 9.1: |
Reading Delimited Text Files / 9.2: |
Reading Text Data Within a Program (Datalines, Cards, Begin Data...) / 9.3: |
Reading Data from the Keyboard / 9.4: |
Reading Fixed-Width Text Files, One Record per Case / 9.5: |
Macro Substitution / 9.5.1: |
Reading Fixed-Width Text Files, Two or More Records per Case / 9.6: |
Importing Data from SAS / 9.7: |
Importing Data from SPSS / 9.8: |
Exporting Data / 9.9: |
Viewing an External Text File / 9.9.1: |
Selecting Variables - Var, Variables = / 10: |
Selecting Variables in SAS and SPSS / 10.1: |
Selecting All Variables / 10.2: |
Selecting Variables by Index Number / 10.3: |
Selecting Variables by Column Name / 10.4: |
Selecting Variables Using Logic / 10.5: |
Selecting Variables by String Search (varname: or varname1-varnameN) / 10.6: |
Selecting Variables Using $ Notation / 10.7: |
Selecting Variables by Simple Name: attach and with / 10.8: |
Selecting Variables with the subset Function (varname1-varnameN) / 10.9: |
Selecting Variables by List / 10.10: |
Generating Indexes A to Z from Two Variable Names / 10.11: |
Saving Selected Variables to a New Dataset / 10.12: |
Example Programs for Variable Selection / 10.13: |
Selecting Observations - Where, If, Select If, Filter / 11: |
Selecting Observations in SAS and SPSS / 11.1: |
Selecting All Observations / 11.2: |
Selecting Observations by Index Number / 11.3: |
Selecting Observations by Row Name / 11.4: |
Selecting Observations Using Logic / 11.5: |
Selecting Observations by String Search / 11.6: |
Selecting Observations with the subset Function / 11.7: |
Generating Indexes from A to Z from Two Row Names / 11.8: |
Variable Selection Methods with No Counterpart for Selecting Observations / 11.9: |
Saving Selected Observations to a New Data Frame / 11.10: |
Example Programs for Selecting Observations / 11.11: |
Selecting Both Variables and Observations / 12: |
Converting Data Structures / 13: |
Converting from Logical to Index and Back / 13.1: |
Data Management / 14: |
Transforming Variables / 14.1: |
Procedures or Functions? The apply Function Decides / 14.2: |
Applying the mean Function / 14.2.1: |
Finding N or NVALID / 14.2.2: |
Conditional Transformations / 14.3: |
Multiple Conditional Transformations / 14.4: |
Missing Values / 14.5: |
Substituting Means for Missing Values / 14.5.1: |
Finding Complete Observations / 14.5.2: |
When "99" Has Meaning / 14.5.3: |
Renaming Variables (... and Observations) / 14.6: |
Renaming Variables - Advanced Examples / 14.7: |
Renaming by Index / 14.7.1: |
Renaming by Column Name / 14.7.2: |
Renaming Many Sequentially Numbered Variable Names / 14.7.3: |
Renaming Observations / 14.7.4: |
Recoding Variables / 14.8: |
Recoding a Few Variables / 14.8.1: |
Recoding Many Variables / 14.8.2: |
Keeping and Dropping Variables / 14.9: |
Stacking/Concatenating/Adding Datasets / 14.10: |
Joining/Merging Data Frames / 14.11: |
Creating Summarized or Aggregated Datasets / 14.12: |
The aggregate Function / 14.12.1: |
The tapply Function / 14.12.2: |
Merging Aggregates with Original Data / 14.12.3: |
Tabular Aggregation / 14.12.4: |
The reshape Package / 14.12.5: |
By or Split File Processing / 14.13: |
Comparing Summarization Methods / 14.13.1: |
Example Programs for By or Split File Processing / 14.13.2: |
Removing Duplicate Observations / 14.14: |
Selecting First or Last Observations per Group / 14.15: |
Reshaping Variables to Observations and Back / 14.16: |
Sorting Data Frames / 14.17: |
Value Labels or Formats (and Measurement Level) / 15: |
Character Factors / 15.1: |
Numeric Factors / 15.2: |
Making Factors of Many Variables / 15.3: |
Converting Factors into Numeric or Character Variables / 15.4: |
Dropping Factor Levels / 15.5: |
Variable Labels / 16: |
Generating Data / 17: |
Generating Numeric Sequences / 17.1: |
Generating Factors / 17.2: |
Generating Repetitious Patterns (not factors) / 17.3: |
Generating Integer Measures / 17.4: |
Generating Continuous Measures / 17.5: |
Generating a Data Frame / 17.6: |
How R Stores Data / 18: |
Managing Your Files and Workspace / 19: |
Loading and Listing Objects / 19.1: |
Understanding Your Search Path / 19.2: |
Attaching Data Frames / 19.3: |
Attaching Files / 19.4: |
Removing Objects from Your Workspace / 19.5: |
Minimizing Your Workspace / 19.6: |
Setting Your Working Directory / 19.7: |
Saving Your Workspace / 19.8: |
Saving Your Programs and Output / 19.9: |
Saving Your History (Journal) / 19.10: |
Graphics Overview / 20: |
SAS/GRAPH / 20.1: |
SPSS Graphics / 20.2: |
R Graphics / 20.3: |
The Grammar of Graphics / 20.4: |
Other Graphics Packages / 20.5: |
Graphics Procedures Versus Graphics Systems / 20.6: |
Graphics Devices / 20.7: |
Practice Data: Mydata100 / 20.8: |
Traditional Graphics / 21: |
Barplots / 21.1: |
Barplots of Counts / 21.1.1: |
Barplots for Subgroups of Counts / 21.1.2: |
Barplots of Means / 21.1.3: |
Adding Titles, Labels, Colors, and Legends / 21.2: |
Graphics Parameters and Multiple Plots on a Page / 21.3: |
Pie Charts / 21.4: |
Dotcharts / 21.5: |
Histograms / 21.6: |
Basic Histograms / 21.6.1: |
Histograms Overlaid / 21.6.2: |
Normal QQ Plots / 21.7: |
Strip Charts / 21.8: |
Scatterplots / 21.9: |
Scatterplots with Jitter / 21.9.1: |
Scatterplots with Large Datasets / 21.9.2: |
Scatterplots with Lines / 21.9.3: |
Scatterplots with Linear Fit by Group / 21.9.4: |
Scatterplots by Group or Level (Coplots) / 21.9.5: |
Scatterplots with Confidence Ellipse / 21.9.6: |
Scatterplots with Confidence and Prediction Intervals / 21.9.7: |
Plotting Labels Instead of Points / 21.9.8: |
Scatterplot Matrices / 21.9.9: |
Dual Axes Plots / 21.10: |
Boxplots / 21.11: |
Error Bar and Interaction Plots / 21.12: |
Adding Equations and Symbols to Graphs / 21.13: |
Summary of Graphics Elements and Parameters / 21.14: |
Plot Demonstrating Many Modifications / 21.15: |
Example Traditional Graphics Programs / 21.16: |
Graphics with ggplot2 (GPL) / 22: |
Overview qplot and ggplot / 22.1: |
Bar Charts / 22.2: |
Bar Charts with Subgroups / 22.3: |
Plots by Group or Level / 22.5: |
Pre-summarized Data / 22.6: |
Adding Titles and Labels / 22.7: |
Strip Plots / 22.9: |
Scatterplots with Fit Lines / 22.12: |
Scatterplots with Reference Lines / 22.15: |
Changing Plot Symbols by Group / 22.16: |
Adding Linear Fits by Group / 22.18: |
Scatterplots Faceted by Groups / 22.19: |
Scatterplot Matrix / 22.20: |
Error Barplots / 22.21: |
Logarithmic Axes / 22.23: |
Aspect Ratio / 22.24: |
Multiple Plots on a Page / 22.25: |
Saving ggplot2 Graphs to a File / 22.26: |
An Example Specifying All Defaults / 22.27: |
Summary of Graphic Elements and Parameters / 22.28: |
Statistics / 23: |
Scientific Notation / 23.1: |
Descriptive Statistics / 23.2: |
Cross-Tabulation / 23.3: |
Correlation / 23.4: |
Linear Regression / 23.5: |
Plotting Diagnostics / 23.5.1: |
Comparing Models / 23.5.2: |
Making Predictions with New Data / 23.5.3: |
t-Test - Independent Groups / 23.6: |
Equality of Variance / 23.7: |
t-Test - Paired or Repeated Measures / 23.8: |
Wilcoxon Mann-Whitney Rank Sum Test - Independent Groups / 23.9: |
Wilcoxon Signed-Rank Test - Paired Groups / 23.10: |
Analysis of Variance / 23.11: |
Sums of Squares / 23.12: |
Kruskal-Wallis Test / 23.13: |
Conclusion / 24: |
A Glossary of R Jargon / Appendix A: |
A Comparison of SAS and SPSS Products with R Packages and Functions / Appendix B: |
Automating Your Settings / Appendix C: |
A comparison of the major attributes of SAS and SPSS to R / Appendix D: |
Bibliography |
Index |