Preface to the third edition |
|
xv | |
Preface to the second edition |
|
xvii | |
Preface to the first edition |
|
xix | |
|
|
1 | (6) |
|
1.1 What is statistical programming? |
|
|
1 | (1) |
|
|
2 | (1) |
|
|
3 | (1) |
|
1.4 Why use a command line? |
|
|
3 | (1) |
|
|
4 | (1) |
|
1.6 Installation of R and RStudio |
|
|
4 | (1) |
|
1.7 Getting started in RStudio |
|
|
5 | (1) |
|
|
6 | (1) |
|
2 Introduction To The R. Language |
|
|
7 | (46) |
|
|
7 | (5) |
|
|
12 | (1) |
|
|
13 | (9) |
|
|
22 | (5) |
|
2.5 Packages, libraries, and repositories |
|
|
27 | (2) |
|
|
29 | (3) |
|
|
32 | (5) |
|
2.8 Logical vectors and relational operators |
|
|
37 | (3) |
|
2.9 Data frames, tibbles, and lists |
|
|
40 | (6) |
|
2.10 Data input and output |
|
|
46 | (7) |
|
3 Programming Statistical Graphics |
|
|
53 | (40) |
|
3.1 Simple high level plots |
|
|
54 | (13) |
|
3.2 Choosing a high level graphic |
|
|
67 | (1) |
|
3.3 Low level graphics functions |
|
|
68 | (2) |
|
3.4 Graphics as a language: ggplot2 |
|
|
70 | (17) |
|
3.5 Other graphics systems |
|
|
87 | (6) |
|
|
93 | (46) |
|
|
93 | (15) |
|
4.2 Managing complexity through functions |
|
|
108 | (6) |
|
4.3 The replicate () function |
|
|
114 | (1) |
|
4.4 Miscellaneous programming tips |
|
|
115 | (3) |
|
4.5 Some general programming guidelines |
|
|
118 | (7) |
|
4.6 Debugging and maintenance |
|
|
125 | (7) |
|
4.7 Efficient programming |
|
|
132 | (7) |
|
5 Complex Programming In The Tidyverse |
|
|
139 | (11) |
|
5.1 The tidyverse principles |
|
|
140 | (1) |
|
5.2 The tibble package: a data frame improvement |
|
|
141 | (2) |
|
5.3 The readr package: reading data in the tidyverse |
|
|
143 | (1) |
|
5.4 The stringr package for manipulating strings |
|
|
144 | (2) |
|
5.5 The dplyr package for manipulating data sets |
|
|
146 | (3) |
|
5.6 Other tidyverse packages |
|
|
149 | (1) |
|
|
150 | (47) |
|
6.1 Monte Carlo simulation |
|
|
150 | (1) |
|
6.2 Generation of pseudorandom numbers |
|
|
151 | (5) |
|
6.3 Simulation of other random variables |
|
|
156 | (17) |
|
6.4 Multivariate random number generation |
|
|
173 | (2) |
|
6.5 Markov chain simulation |
|
|
175 | (2) |
|
6.6 Monte Carlo integration |
|
|
177 | (2) |
|
6.7 Advanced simulation methods |
|
|
179 | (18) |
|
7 Computational Linear Algebra |
|
|
197 | (25) |
|
7.1 Vectors and matrices in R |
|
|
198 | (7) |
|
7.2 Matrix multiplication and inversion |
|
|
205 | (5) |
|
7.3 Eigenvalues and eigenvectors |
|
|
210 | (1) |
|
7.4 Other matrix decompositions |
|
|
211 | (7) |
|
7.5 Other matrix operations |
|
|
218 | (4) |
|
|
222 | (35) |
|
8.1 The golden section search method |
|
|
222 | (3) |
|
|
225 | (2) |
|
8.3 The Nelder--Mead simplex method |
|
|
227 | (4) |
|
|
231 | (1) |
|
|
231 | (17) |
|
Appendix A Review of random variables and distributions |
|
|
248 | (3) |
|
Appendix B Base graphics details |
|
|
251 | (6) |
|
B.1 The plotting region and margins |
|
|
251 | (1) |
|
B.2 Adjusting axis tick labels |
|
|
252 | (3) |
|
B.3 Setting graphical parameters |
|
|
255 | (2) |
Index |
|
257 | |