《
Using R for Data Analysis and Graphics -- Introduction, Code and Commentary》 by J H Maindonald
TABLE OF CONTENTS
Introduction
1. Starting Up
1.1 Getting started under Windows
1.2 Use of an Editor Script Window
1.3 A Short R Session
1.4 Further Notational Details
1.5 On-line Help
1.6 The Loading or Attaching of Datasets
1.7 Exercise
2. An Overview of R
2.1 The Uses of R
2.2 R Objects
*2.3 Looping
2.4 Vectors
2.5 Data Frames
2.6 Common Useful Functions
2.7 Making Tables
2.8 The Search List
2.9 Functions in R
2.10 More Detailed Information
2.11 Exercises
3. Plotting
3.1 plot () and allied functions
3.2 Fine control – Parameter settings
3.3 Adding points, lines and text
3.4 Identification and Location on the Figure Region
3.5 Plots that show the distribution of data values
3.6 Other Useful Plotting Functions
3.7 Plotting Mathematical Symbols
3.8 Guidelines for Graphs
3.9 Exercises
3.10 References
4. Lattice graphics
4.1 Examples that Present Panels of Scatterplots – Using xyplot()
4.3 Exercises
5. Linear (Multiple Regression) Models and Analysis of Variance
5.1 The Model Formula in Straight Line Regression
5.2 Regression Objects
5.3 Model Formulae, and the X Matrix
5.4 Multiple Linear Regression Models
5.5 Polynomial and Spline Regression
5.6 Using Factors in R Models
5.7 Multiple Lines – Different Regression Lines for Different Species
5.8 aov models (Analysis of Variance)
5.9 Exercises
5.10 References
6. Multivariate and Tree-Based Methods
6.1 Multivariate EDA, and Principal Components Analysis
6.2 Cluster Analysis
6.3 Discriminant Analysis
6.4 Decision Tree models (Tree-based models)
6.5 Exercises
6.6 References
*7. R Data Structures
7.1 Vectors
7.2 Missing Values
7.3 Data frames
7.4 Data Entry
7.5 Factors and Ordered Factors
7.6 Ordered Factors
7.7 Lists
*7.8 Matrices and Arrays
7.9 Exercises
8. Useful Functions
8.1 Confidence Intervals and Tests
8.2 Matching and Ordering
8.3 String Functions
8.4 Application of a Function to the Columns of an Array or Data Frame
*8.5 aggregate() and tapply()
*8.7 Merging Data Frames
8.8 Dates
8.9 Exercises
9. Writing Functions and other Code
9.1 Syntax and Semantics
9.2 Issues for the Writing and Use of Functions
9.3 Functions as aids to Data Management
9.4 A Simulation Example
9.5 Exercises
*10. GLM, and General Non-linear Models
10.1 A Taxonomy of Extensions to the Linear Model
10.2 Logistic Regression
10.3 glm models (Generalized Linear Regression Modelling)
10.4 Models that Include Smooth Spline Terms
10.5 Survival Analysis
10.6 Non-linear Models
10.7 Model Summaries
10.8 Further Elaborations
10.9 Exercises
10.10 References
*11. Multi-level Models, Repeated Measures and Time Series
11.1 Multi-Level Models, Including Repeated Measures Models
11.2 Time Series Models
11.3 Exercises
11.4 References
*12. Advanced Programming Topics
12.1. Methods
12.2 Extracting Arguments to Functions
12.3 Parsing and Evaluation of Expressions
12.4 Plotting a mathematical expression
12.4 Searching R functions for a specified token
13. R Resources
13.1 R Packages for Windows
13.2 Literature written by expert users
13.3 The R-help electronic mail discussion list
13.4 Competing Systems – XLISP-STAT
14. Appendix 1
14.1 Data Sets Referred to in these Notes
14.2 Answers to Selected Exercises