Preface |
|
ix | |
|
|
1 | (16) |
|
|
2 | (1) |
|
Who This Book Is for and How to Use It |
|
|
2 | (2) |
|
|
4 | (1) |
|
What Is Efficient R Programming? |
|
|
4 | (2) |
|
|
6 | (1) |
|
Cross-Transferable Skills for Efficiency |
|
|
7 | (2) |
|
|
7 | (1) |
|
Consistent Style and Code Conventions |
|
|
8 | (1) |
|
Benchmarking and Profiling |
|
|
9 | (5) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (3) |
|
|
14 | (1) |
|
|
14 | (1) |
|
|
14 | (1) |
|
|
14 | (3) |
|
|
17 | (30) |
|
|
18 | (1) |
|
Top Five Tips for an Efficient R Setup |
|
|
18 | (1) |
|
|
18 | (3) |
|
Operating System and Resource Monitoring |
|
|
19 | (2) |
|
|
21 | (4) |
|
|
22 | (1) |
|
|
23 | (1) |
|
|
23 | (1) |
|
Installing R Packages with Dependencies |
|
|
24 | (1) |
|
|
24 | (1) |
|
|
25 | (10) |
|
|
25 | (1) |
|
An Overview of R's Startup Files |
|
|
26 | (1) |
|
The Location of Startup Files |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
29 | (4) |
|
|
33 | (2) |
|
|
35 | (8) |
|
Installing and Updating RStudio |
|
|
35 | (1) |
|
|
36 | (2) |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
40 | (1) |
|
Object Display and Output Table |
|
|
41 | (1) |
|
|
41 | (2) |
|
BLAS and Alternative R Interpreters |
|
|
43 | (3) |
|
Testing Performance Gains from BLAS |
|
|
44 | (1) |
|
|
45 | (1) |
|
Useful BLAS/Benchmarking Resources |
|
|
46 | (1) |
|
|
46 | (1) |
|
|
47 | (22) |
|
|
47 | (1) |
|
Top Five Tips for Efficient Programming |
|
|
47 | (1) |
|
|
48 | (5) |
|
|
49 | (1) |
|
|
50 | (3) |
|
Communicating with the User |
|
|
53 | (3) |
|
|
53 | (1) |
|
|
54 | (1) |
|
Informative Output: message() and cat() |
|
|
55 | (1) |
|
|
55 | (1) |
|
|
56 | (1) |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
57 | (4) |
|
|
59 | (1) |
|
|
60 | (1) |
|
|
61 | (3) |
|
|
63 | (1) |
|
|
64 | (3) |
|
Example: The Mean Function |
|
|
65 | (1) |
|
|
66 | (1) |
|
|
67 | (2) |
|
|
69 | (16) |
|
|
69 | (1) |
|
Top Five Tips for Efficient Workflow |
|
|
70 | (1) |
|
A Project Planning Typology |
|
|
70 | (2) |
|
Project Planning and Management |
|
|
72 | (4) |
|
|
73 | (1) |
|
Making Your Workflow SMART |
|
|
74 | (1) |
|
|
75 | (1) |
|
|
76 | (4) |
|
|
78 | (1) |
|
|
78 | (2) |
|
|
80 | (4) |
|
Dynamic Documents with R Markdown |
|
|
81 | (2) |
|
|
83 | (1) |
|
|
84 | (1) |
|
|
85 | (14) |
|
|
86 | (1) |
|
Top Five Tips for Efficient Data I/O |
|
|
86 | (1) |
|
Versatile Data Import with rio |
|
|
86 | (2) |
|
|
88 | (5) |
|
Differences Between fread() and read_csv() |
|
|
90 | (2) |
|
Preprocessing Text Outside R |
|
|
92 | (1) |
|
|
93 | (3) |
|
Native Binary Formats: Rdata or Rds? |
|
|
94 | (1) |
|
|
94 | (1) |
|
Benchmarking Binary File Formats |
|
|
94 | (2) |
|
|
96 | (1) |
|
Getting Data from the Internet |
|
|
96 | (1) |
|
Accessing Data Stored in Packages |
|
|
97 | (1) |
|
|
98 | (1) |
|
6 Efficient Data Carpentry |
|
|
99 | (28) |
|
|
100 | (1) |
|
Top Five Tips for Efficient Data Carpentry |
|
|
100 | (1) |
|
Efficient Data Frames with tibble |
|
|
100 | (2) |
|
Tidying Data with tidyr and Regular Expressions |
|
|
102 | (6) |
|
Make Wide Tables Long with gather() |
|
|
103 | (1) |
|
Split Joint Variables with separate() |
|
|
104 | (1) |
|
|
105 | (1) |
|
|
106 | (2) |
|
Efficient Data Processing with dplyr |
|
|
108 | (10) |
|
|
110 | (1) |
|
|
110 | (1) |
|
|
111 | (1) |
|
|
112 | (2) |
|
|
114 | (3) |
|
|
117 | (1) |
|
|
118 | (1) |
|
|
119 | (4) |
|
|
121 | (2) |
|
Data Processing with data.table |
|
|
123 | (2) |
|
|
125 | (2) |
|
|
127 | (26) |
|
|
128 | (1) |
|
Top Five Tips for Efficient Optimization |
|
|
128 | (1) |
|
|
128 | (3) |
|
Getting Started with profvis |
|
|
129 | (1) |
|
Example: Monopoly Simulation |
|
|
130 | (1) |
|
|
131 | (7) |
|
The if() Versus ifelse() Functions |
|
|
131 | (1) |
|
|
132 | (1) |
|
|
133 | (1) |
|
|
133 | (1) |
|
Converting Factors to Numerics |
|
|
134 | (1) |
|
|
134 | (1) |
|
Row and Column Operations |
|
|
134 | (1) |
|
|
135 | (1) |
|
|
135 | (3) |
|
Example: Optimizing the move_square() Function |
|
|
138 | (1) |
|
|
139 | (3) |
|
Parallel Versions of Apply Functions |
|
|
140 | (1) |
|
Example: Snakes and Ladders |
|
|
140 | (1) |
|
|
141 | (1) |
|
Parallel Code under Linux and OS X |
|
|
141 | (1) |
|
|
142 | (9) |
|
|
143 | (1) |
|
The cppFunction() Command |
|
|
144 | (1) |
|
|
145 | (1) |
|
|
145 | (1) |
|
|
146 | (3) |
|
|
149 | (1) |
|
|
149 | (1) |
|
|
150 | (1) |
|
|
151 | (2) |
|
|
153 | (10) |
|
|
153 | (1) |
|
Top Five Tips for Efficient Hardware |
|
|
153 | (1) |
|
Background: What Is a Byte? |
|
|
154 | (1) |
|
|
155 | (3) |
|
Hard Drives: HDD Versus SSD |
|
|
158 | (1) |
|
Operating Systems: 32-Bit or 64-Bit |
|
|
159 | (1) |
|
|
160 | (2) |
|
|
162 | (1) |
|
|
162 | (1) |
|
9 Efficient Collaboration |
|
|
163 | (12) |
|
|
164 | (1) |
|
Top Five Tips for Efficient Collaboration |
|
|
164 | (1) |
|
|
164 | (5) |
|
Reformatting Code with RStudio |
|
|
165 | (1) |
|
|
165 | (1) |
|
|
166 | (1) |
|
|
166 | (1) |
|
|
167 | (1) |
|
|
167 | (1) |
|
|
168 | (1) |
|
|
168 | (1) |
|
|
168 | (1) |
|
|
169 | (1) |
|
|
169 | (4) |
|
|
170 | (1) |
|
Git Integration in RStudio |
|
|
170 | (1) |
|
|
171 | (1) |
|
Branches, Forks, Pulls, and Clones |
|
|
172 | (1) |
|
|
173 | (1) |
|
|
174 | (1) |
|
|
175 | (14) |
|
|
175 | (1) |
|
Top Five Tips for Efficient Learning |
|
|
175 | (1) |
|
|
176 | (6) |
|
|
177 | (1) |
|
Finding and Using Vignettes |
|
|
178 | (1) |
|
Getting Help on Functions |
|
|
179 | (2) |
|
|
181 | (1) |
|
|
182 | (1) |
|
|
182 | (2) |
|
|
183 | (1) |
|
|
184 | (1) |
|
|
184 | (1) |
|
|
184 | (1) |
|
|
185 | (1) |
|
|
185 | (2) |
|
|
187 | (1) |
|
|
187 | (2) |
A Package Dependencies |
|
189 | (2) |
B References |
|
191 | (6) |
Index |
|
197 | |