1.Preliminaries
First Steps
Running Code in R
Some Terminology
Hierarchy of Data Classes
Data Structures
Operators
Functions
R Packages
Probability Distributions
Coding Conventions
Some Book-keeping and Other Tips
Getting Quick Coding Help
1.Bringing Data Into and Out of R
Entering Data Through Coding
Number and Sample Generating Tricks
The R Data Editor
Reading Text Files
Reading Data from Other File Formats
Reading Data from the Keyboard
Saving and Exporting Data
1.Accessing Contents of Data Structures
Extracting Data from Vectors
Conducting Data Searches in Vectors
Working with Factors
Navigating Data Frames
Lists
Choosing an Access/Extraction Method
Additional Notes
More About the attach Function
About Functions and their Arguments
Alternative Argument Assignments in Function Calls
2.Altering and Manipulating Data
Altering Entries in Vectors
Transformations
Manipulating Character Strings
Sorting Vectors and Factors
Altering Data Frames
Sorting Data Frames
Moving Between Lists and Data Frames
Additional Notes on the merge Function
1.Summaries and Statistics
Univariate Frequency Distributions
Bivariate Frequency Distributions
Statistics for Univariate Samples
Measures of Central Tendency
Measures of Spread
Measures of Position
Measures of Shape
Five-Number Summaries and Outliers
Elementary Five-Number Summary
Tukeys Five-Number
The boxplotstats Function
1.More on Computing with R
Computing with Numeric Vectors
Working with Lists, Data Frames and Arrays
The sapply Function
The tapply Function
The by Function
The aggregate Function
The apply Function
The sweep Function
For-loops
Conditional Statements and the switch Function
The if-then Statement
The if-then-else Statement
The switch Function
Preparing Your Own Functions
1.Basic Charts for Categorical Data
Preliminary Comments
Bar Charts
Dot Charts
Pie Charts
Exporting Graphics Images
Additional Notes
Customizing Plotting Windows
The plotnew and plotwindow Functions
More on the paste Function
The title Function
More on the legend Function
More on the mtext Function
The text Function
1.Basic Plots for Numeric Data
Histograms
Boxplots
Stripcharts
QQ-Plots
Normal Probability QQ-Plots
Interpreting Normal Probability QQ-Plots
More on Reference Lines for QQ-Plots
QQ-Plots for Other Distributions
Additional Notes
More on the ifelse Function
Revisiting the axis Function
Frequency Polygons and Ogives
1.Scatterplots, Lines, and Curves
Scatterplots
Basic Plots
Manipulating Plotting Characters
Plotting Transformed Data
Matrix Scatterplots
The matplot Function
Graphs of Lines
Graphs of Curves
Superimposing Multiple Lines and/or Curves
Time-series Plots
3.More Graphics Tools
Partitioning Graphics Windows
The layout Function
The splitscreen Function
Customizing Plotted Text and Symbols
Inserting Mathematical Annotation in Plots
More Low-level Graphics Functions
The points and symbols Functions
The grid, segments and arrows Functions
Boxes, Rectangles and Polygons
Error Bars
Computing Bounds for Error Bars
The errorBarplot Function
Purpose and Interpretation of Error Bars
More R Graphics Resources
1.Tests for One and Two Proportions
Relevant Probability Distributions
Binomial Distributions
Hypergeometric Distributions
Normal Distributions
Chi-square Distributions
Single Population Proportions
Estimating a Population Proportion
Hypotheses for Single Proportion Tests
A Normal Approximation Test
A Chi-square Test
An Exact Test
Which Approach Should be Used?
Two Population Proportions
Estimating Differences Between Proportions
Hypotheses for Two Proportions Tests
A Normal Approximation Test
A Chi-square Test
Fishers Exact Test
Which Approach Should be Used?
Additional Notes
Normal Approximations of Binomial Distributions
One- versus Two-sided Hypothesis Tests
4.Tests for More than Two Proportions
Equality of Three or More Proportions
Pearsons Homogeneity of Proportions Test
Marascuilos Large Sample Procedure
Cohens Small Sample Procedure
Simultaneous Pairwise Comparisons
Marascuilos Large Sample Procedure
Cohens Small Sample Procedure
Linear Contrasts of Proportions
Marascuilos Large Sample Approach
Cohens Small Sample Approach
The Chi-square Goodness-of-Fit Test
1.Tests of Variances and Spread
Relevant Probability Distributions
F Distributions
Using a Sample to Assess Normality
Single Population Variances
Estimating a Variance
Testing a Variance
Exactly Two Population Variances
Estimating the Ratio of Two Variances
Testing the Ratio of Two Variances
What if the Normality Assumption is Violated?
Two or More Population Variances
Assessing Spread Graphically
Levenes Test
Levenes Test with Trimmed Means
Brown-Forsythe Test
Fligner-Killeen Test
1.Tests for One or Two Means
Students t-Distribution
Single Population Means
Verifying the Normality Assumption
Estimating a Mean
Testing a Mean
Can a Normal Approximation be Used Here?
Exactly Two Population Means
Verifying Assumptions
The Test for Dependent Samples
Tests for Independent Samples
1.Tests for More than Two Means
Relevant Probability Distributions
Studentized Range Distribution
Dunnetts Test Distribution
Studentized Maximum Modulus Distribution
Setting the Stage
Equality of Means ' Equal Variances Case
Pairwise Comparisons ' Equal Variances
Bonferronis Procedure
Tukeys Procedure
t Tests and Comparisons with a Control
Dunnetts Test and Comparisons with a Control
Which Procedure to Choose
Equality of Means ' Unequal Variances Case
Large-sample Chi-square Test
Welchs F Test
Hotellings T Test
Pairwise Comparisons ' Unequal Variances
Large-sample Chi-square Test
Dunnetts C Procedure
Dunnetts T Procedure
Comparisons with a Control
Which Procedure to Choose
The Nature of Differences Found
All Possible Pairwise Comparisons
Comparisons with a Control
1.Selected Tests for Medians, and More
Relevant Probability Distributions
Distribution of the Signed Rank Statistic
Distribution of the Rank Sum Statistic
The One-sample Sign Test
The Exact Test
The Normal Approximation
Paired Samples Sign Test
Independent Samples Median Test
Equality of Medians
Pairwise Comparisons of Medians
Single Sample Signed Rank Test
The Exact Test
The Normal Approximation
Paired Samples Signed Rank Test
Rank Sum Test of Medians
The Exact Mann-Whitney Test
The Normal Approximation
The Wilcoxon Rank Sum Test
Using the Kruskal-Wallis Test to Test Medians
Working with Ordinal Data
Paired Samples
Independent Samples
More than Two Independent Samples
Some Comments on the Use of Ordinal Data
1.Dependence and Independence
Assessing Bivariate Normality
Pearsons Correlation Coefficient
An Interval Estimate of ?
Testing the Significance of ?
Testing a Null Hypothesis with ? ?
Kendalls Correlation Coefficient
An Interval Estimate of t
Exact Test of the Significance of t
Approximate Test of the Significance of t
Spearmans Rank Correlation Coefficient
Exact Test of the Significance of ?S
Approximate Test of the Significance ?S
Correlations in General ' Comments and Cautions
Chi-square Test of Independence
For the Curious ' Distributions of rK and rS