Preface |
|
ix | |
Introduction to the second edition |
|
ix | |
What this book is about |
|
xii | |
How the book is organized |
|
xiv | |
Why R? |
|
xvi | |
Updates |
|
xviii | |
Acknowledgements |
|
xviii | |
|
Chapter 1 Getting and Getting Acquainted with R |
|
|
1 | (34) |
|
|
1 | (1) |
|
|
2 | (3) |
|
|
5 | (1) |
|
|
6 | (2) |
|
1.5 Using R as a giant calculator (the size of your computer) |
|
|
8 | (7) |
|
|
15 | (6) |
|
|
21 | (1) |
|
1.8 Important functionality: packages |
|
|
21 | (3) |
|
|
24 | (2) |
|
1.10 A mini-practical---some in-depth play |
|
|
26 | (2) |
|
1.11 Some more top tips and hints for a successful first (and more) R experience |
|
|
28 | (7) |
|
Appendix 1a Mini-tutorial solutions |
|
|
29 | (1) |
|
Appendix 1b File extensions and operating systems |
|
|
30 | (5) |
|
Chapter 2 Getting Your Data into R |
|
|
35 | (22) |
|
2.1 Getting data ready for R |
|
|
35 | (5) |
|
2.2 Getting your data into R |
|
|
40 | (5) |
|
2.3 Checking that your data are your data |
|
|
45 | (3) |
|
2.4 Basic troubleshooting while importing data |
|
|
48 | (1) |
|
|
49 | (8) |
|
Appendix Advanced activity: dealing with untidy data |
|
|
50 | (7) |
|
Chapter 3 Data Management, Manipulation, and Exploration with dplyr |
|
|
57 | (22) |
|
3.1 Summary statistics for each variable |
|
|
58 | (1) |
|
|
59 | (1) |
|
|
60 | (7) |
|
|
67 | (1) |
|
|
68 | (1) |
|
3.6 Mini-summary and two top tips |
|
|
69 | (1) |
|
3.7 Calculating summary statistics about groups of your data |
|
|
70 | (3) |
|
3.8 What have you learned ... lots |
|
|
73 | (6) |
|
Appendix 3a Comparing classic methods and dplyr |
|
|
73 | (1) |
|
Appendix 3b Advanced dplyr |
|
|
74 | (5) |
|
Chapter 4 Visualizing Your Data |
|
|
79 | (14) |
|
4.1 The first step in every data analysis---making a picture |
|
|
79 | (1) |
|
4.2 ggplot2: a grammar for graphics |
|
|
80 | (5) |
|
4.3 Box-and-whisker plots |
|
|
85 | (2) |
|
4.4 Distributions: making histograms of numeric variables |
|
|
87 | (3) |
|
4.5 Saving your graphs for presentation, documents, etc. |
|
|
90 | (1) |
|
|
91 | (2) |
|
Chapter 5 Introducing Statistics in R |
|
|
93 | (38) |
|
5.1 Getting started doing statistics in R |
|
|
93 | (2) |
|
5.2 Χ2 contingency table analysis |
|
|
95 | (8) |
|
|
103 | (5) |
|
5.4 Introducing ... linear models |
|
|
108 | (1) |
|
5.5 Simple linear regression |
|
|
109 | (9) |
|
5.6 Analysis of variance: the one-way ANOVA |
|
|
118 | (10) |
|
|
128 | (3) |
|
Appendix Getting packages not on CRAN |
|
|
128 | (3) |
|
Chapter 6 Advancing Your Statistics in R |
|
|
131 | (36) |
|
6.1 Getting started with more advanced statistics |
|
|
131 | (1) |
|
|
131 | (14) |
|
6.3 Analysis of covariance (ANCOVA) |
|
|
145 | (19) |
|
6.4 Overview: an analysis workflow |
|
|
164 | (3) |
|
Chapter 7 Getting Started with Generalized Linear Models |
|
|
167 | (36) |
|
|
167 | (3) |
|
7.2 Counts and rates---Poisson GLMs |
|
|
170 | (3) |
|
|
173 | (4) |
|
7.4 Doing it right---the Poisson GLM |
|
|
177 | (17) |
|
7.5 When a Poisson GLM isn't good for counts |
|
|
194 | (7) |
|
7.6 Summary, and beyond simple Poisson regression |
|
|
201 | (2) |
|
Chapter 8 Pimping Your Plots: Scales and Themes in ggplot2 |
|
|
203 | (16) |
|
8.1 What you already know about graphs |
|
|
203 | (1) |
|
|
204 | (2) |
|
8.3 What you may want to customize |
|
|
206 | (1) |
|
8.4 Axis labels, axis limits, and annotation |
|
|
207 | (2) |
|
|
209 | (3) |
|
|
212 | (6) |
|
|
218 | (1) |
|
Chapter 9 Closing Remarks: Final Comments and Encouragement |
|
|
219 | (4) |
|
|
223 | (4) |
|
|
223 | (1) |
|
Appendix 2 Further Reading |
|
|
224 | (1) |
|
|
225 | (2) |
Index |
|
227 | |