-
Notifications
You must be signed in to change notification settings - Fork 4
/
ds.toc
143 lines (143 loc) · 12.3 KB
/
ds.toc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
\contentsline {fm}{List of Tables}{vii}{chapter*.1}
\contentsline {fm}{List of Figures}{ix}{chapter*.2}
\contentsline {chapter}{Introduction}{xi}{chapter*.3}
\contentsline {section}{\numberline {0.1}\texttt {R} and \texttt {RStudio}}{xiii}{section.0.1}
\contentsline {subsection}{\numberline {0.1.1}Getting started with \texttt {R}}{xiv}{subsection.0.1.1}
\contentsline {subsection}{\numberline {0.1.2}Why \texttt {R}?}{xiv}{subsection.0.1.2}
\contentsline {subsection}{\numberline {0.1.3}About RStudio}{xv}{subsection.0.1.3}
\contentsline {subsection}{\numberline {0.1.4}Conventions}{xvi}{subsection.0.1.4}
\contentsline {subsection}{\numberline {0.1.5}Getting help}{xvii}{subsection.0.1.5}
\contentsline {subsection}{\numberline {0.1.6}Installing packages}{xviii}{subsection.0.1.6}
\contentsline {subsection}{\numberline {0.1.7}Additional References}{xx}{subsection.0.1.7}
\contentsline {section}{\numberline {0.2}Basic Probability and Statistics with \texttt {R}}{xx}{section.0.2}
\contentsline {subsection}{\numberline {0.2.1}Simple calculations}{xxi}{subsection.0.2.1}
\contentsline {subsection}{\numberline {0.2.2}Probability Distributions}{xxi}{subsection.0.2.2}
\contentsline {subsubsection}{\numberline {0.2.2.1}Example: Normal Test Scores of College Entrance Exam}{xxii}{subsubsection.0.2.2.1}
\contentsline {subsection}{\numberline {0.2.3}Summary Statistics}{xxiii}{subsection.0.2.3}
\contentsline {subsubsection}{\numberline {0.2.3.1}Numerical Input}{xxiii}{subsubsection.0.2.3.1}
\contentsline {subsubsection}{\numberline {0.2.3.2}Factor Input}{xxiv}{subsubsection.0.2.3.2}
\contentsline {subsubsection}{\numberline {0.2.3.3}Dataset Inputs}{xxiv}{subsubsection.0.2.3.3}
\contentsline {section}{\numberline {0.3}Main References}{xxvi}{section.0.3}
\contentsline {section}{\numberline {0.4}License}{xxvi}{section.0.4}
\contentsline {part}{I\hspace {1em}Foundation}{xxvii}{part.1}
\contentsline {chapter}{RMarkdown}{xxix}{chapter*.5}
\contentsline {subsection}{What is \textbf {literate} programming ?}{xxix}{section*.6}
\contentsline {subsection}{What is \textbf {reproducible} research ?}{xxix}{section*.7}
\contentsline {section}{\numberline {0.5}Create an R Markdown file in RStudio}{xxx}{section.0.5}
\contentsline {section}{\numberline {0.6}YAML Metadata}{xxxi}{section.0.6}
\contentsline {subsection}{\numberline {0.6.1}Subsections}{xxxiii}{subsection.0.6.1}
\contentsline {section}{\numberline {0.7}Text}{xxxiv}{section.0.7}
\contentsline {subsection}{\numberline {0.7.1}Headers}{xxxv}{subsection.0.7.1}
\contentsline {subsection}{\numberline {0.7.2}Lists}{xxxv}{subsection.0.7.2}
\contentsline {subsection}{\numberline {0.7.3}Hyperlinks}{xxxvi}{subsection.0.7.3}
\contentsline {subsection}{\numberline {0.7.4}Blockquotes}{xxxvi}{subsection.0.7.4}
\contentsline {subsection}{\numberline {0.7.5}Pictures}{xxxvi}{subsection.0.7.5}
\contentsline {subsection}{\numberline {0.7.6}LaTeX}{xxxvii}{subsection.0.7.6}
\contentsline {subsubsection}{\numberline {0.7.6.1}LaTeX in RMarkdown}{xxxvii}{subsubsection.0.7.6.1}
\contentsline {subsection}{\numberline {0.7.7}Cross-referencing Sections}{xxxviii}{subsection.0.7.7}
\contentsline {subsection}{\numberline {0.7.8}Citations and Bibliography}{xxxviii}{subsection.0.7.8}
\contentsline {subsection}{\numberline {0.7.9}Tables}{xlii}{subsection.0.7.9}
\contentsline {subsection}{\numberline {0.7.10}Additional References}{xliii}{subsection.0.7.10}
\contentsline {section}{\numberline {0.8}Code Chunks}{xliii}{section.0.8}
\contentsline {subsection}{\numberline {0.8.1}Code Chunk Options}{xliv}{subsection.0.8.1}
\contentsline {subsection}{\numberline {0.8.2}Comments}{xlv}{subsection.0.8.2}
\contentsline {subsection}{\numberline {0.8.3}In-line R}{xlvi}{subsection.0.8.3}
\contentsline {subsection}{\numberline {0.8.4}Cache}{xlvii}{subsection.0.8.4}
\contentsline {section}{\numberline {0.9}Render Output}{xlix}{section.0.9}
\contentsline {section}{\numberline {0.10}Addition Information}{l}{section.0.10}
\contentsline {chapter}{GitHub}{li}{chapter*.9}
\contentsline {section}{\numberline {0.11}Version Control}{lii}{section.0.11}
\contentsline {section}{\numberline {0.12}Git and GitHub}{lii}{section.0.12}
\contentsline {subsection}{\numberline {0.12.1}Git Setup}{liii}{subsection.0.12.1}
\contentsline {subsubsection}{\numberline {0.12.1.1}Tell Git Who You Are}{liii}{subsubsection.0.12.1.1}
\contentsline {subsection}{\numberline {0.12.2}GitHub Setup}{liii}{subsection.0.12.2}
\contentsline {subsection}{\numberline {0.12.3}Student Developer Pack}{liv}{subsection.0.12.3}
\contentsline {section}{\numberline {0.13}GitHub Workflow}{lv}{section.0.13}
\contentsline {subsection}{\numberline {0.13.1}Branching}{lvi}{subsection.0.13.1}
\contentsline {subsection}{\numberline {0.13.2}Pull}{lvi}{subsection.0.13.2}
\contentsline {subsection}{\numberline {0.13.3}Commits}{lvii}{subsection.0.13.3}
\contentsline {subsubsection}{\numberline {0.13.3.1}Pull Request}{lvii}{subsubsection.0.13.3.1}
\contentsline {subsection}{\numberline {0.13.4}Push or Merge}{lviii}{subsection.0.13.4}
\contentsline {subsection}{\numberline {0.13.5}Merge Conflicts}{lviii}{subsection.0.13.5}
\contentsline {section}{\numberline {0.14}GitHub Workflow on Command Line / Git Bash}{lviii}{section.0.14}
\contentsline {section}{\numberline {0.15}Issues}{lxi}{section.0.15}
\contentsline {section}{\numberline {0.16}Slack Integration}{lxi}{section.0.16}
\contentsline {section}{\numberline {0.17}Additional References}{lxi}{section.0.17}
\contentsline {part}{II\hspace {1em}Introduction to R}{lxiii}{part.2}
\contentsline {chapter}{Data Structures}{lxv}{chapter*.10}
\contentsline {section}{\numberline {0.18}Vectors}{lxvi}{section.0.18}
\contentsline {subsection}{\numberline {0.18.1}Type}{lxviii}{subsection.0.18.1}
\contentsline {subsection}{\numberline {0.18.2}Coercion}{lxix}{subsection.0.18.2}
\contentsline {subsection}{\numberline {0.18.3}Subsetting}{lxx}{subsection.0.18.3}
\contentsline {subsection}{\numberline {0.18.4}Attributes}{lxxi}{subsection.0.18.4}
\contentsline {subsection}{\numberline {0.18.5}Adding Labels}{lxxii}{subsection.0.18.5}
\contentsline {subsection}{\numberline {0.18.6}Working with Dates}{lxxiii}{subsection.0.18.6}
\contentsline {subsection}{\numberline {0.18.7}Useful Functions with Vectors}{lxxv}{subsection.0.18.7}
\contentsline {subsection}{\numberline {0.18.8}Creating sequences}{lxxviii}{subsection.0.18.8}
\contentsline {subsection}{\numberline {0.18.9}Example: Apple Stock Price}{lxxxi}{subsection.0.18.9}
\contentsline {section}{\numberline {0.19}Matrices}{lxxxiv}{section.0.19}
\contentsline {subsection}{\numberline {0.19.1}Subsetting}{lxxxvi}{subsection.0.19.1}
\contentsline {subsection}{\numberline {0.19.2}Matrix Operators in R}{lxxxviii}{subsection.0.19.2}
\contentsline {subsection}{\numberline {0.19.3}Example: Summary Statistics with Matrix Notation}{xcii}{subsection.0.19.3}
\contentsline {subsection}{\numberline {0.19.4}Example: Portfolio Optimization}{xcvi}{subsection.0.19.4}
\contentsline {section}{\numberline {0.20}Array}{c}{section.0.20}
\contentsline {section}{\numberline {0.21}List}{civ}{section.0.21}
\contentsline {section}{\numberline {0.22}Dataframe}{cviii}{section.0.22}
\contentsline {subsection}{\numberline {0.22.1}Combination}{cix}{subsection.0.22.1}
\contentsline {subsection}{\numberline {0.22.2}Subsetting}{cx}{subsection.0.22.2}
\contentsline {subsection}{\numberline {0.22.3}Example: Maps}{cxiv}{subsection.0.22.3}
\contentsline {chapter}{Control Structures}{cxvii}{chapter*.14}
\contentsline {section}{\numberline {0.23}Introduction}{cxvii}{section.0.23}
\contentsline {section}{\numberline {0.24}Selection control statements}{cxviii}{section.0.24}
\contentsline {subsection}{\numberline {0.24.1}Logical Operators}{cxix}{subsection.0.24.1}
\contentsline {subsection}{\numberline {0.24.2}Selection Operators}{cxxi}{subsection.0.24.2}
\contentsline {subsubsection}{\numberline {0.24.2.1}\texttt {if} Statements}{cxxi}{subsubsection.0.24.2.1}
\contentsline {subsubsection}{\numberline {0.24.2.2}\texttt {if/else} Statements}{cxxiii}{subsubsection.0.24.2.2}
\contentsline {subsubsection}{\numberline {0.24.2.3}\texttt {if/elseif/else} Statements}{cxxv}{subsubsection.0.24.2.3}
\contentsline {subsubsection}{\numberline {0.24.2.4}\texttt {switch} Statement}{cxxvi}{subsubsection.0.24.2.4}
\contentsline {subsection}{\numberline {0.24.3}Iterative Control Statements}{cxxviii}{subsection.0.24.3}
\contentsline {subsubsection}{\numberline {0.24.3.1}\texttt {for} Loops}{cxxix}{subsubsection.0.24.3.1}
\contentsline {subsubsection}{\numberline {0.24.3.2}\texttt {while} Statements}{cxxxiv}{subsubsection.0.24.3.2}
\contentsline {section}{\numberline {0.25}Example: The Bootstrap}{cxxxvi}{section.0.25}
\contentsline {section}{\numberline {0.26}Example: Random Walk}{cxl}{section.0.26}
\contentsline {section}{\numberline {0.27}Example: Monte-Carlo Integration}{cxliii}{section.0.27}
\contentsline {subsection}{\numberline {0.27.1}Introduction}{cxliii}{subsection.0.27.1}
\contentsline {subsection}{\numberline {0.27.2}Implementation}{cxlvi}{subsection.0.27.2}
\contentsline {subsection}{\numberline {0.27.3}Application to the Normal Distribution}{cxlviii}{subsection.0.27.3}
\contentsline {subsection}{\numberline {0.27.4}Application to Nonelementary Integrals}{cxlix}{subsection.0.27.4}
\contentsline {chapter}{Functions}{cli}{chapter*.15}
\contentsline {section}{\numberline {0.28}R functions}{cliii}{section.0.28}
\contentsline {section}{\numberline {0.29}Creating functions in R}{clvi}{section.0.29}
\contentsline {subsection}{\numberline {0.29.1}Function arguments}{clvii}{subsection.0.29.1}
\contentsline {subsection}{\numberline {0.29.2}Function body}{clxi}{subsection.0.29.2}
\contentsline {section}{\numberline {0.30}Function environment}{clxvii}{section.0.30}
\contentsline {section}{\numberline {0.31}Example (continued): Least-squares function}{clxx}{section.0.31}
\contentsline {part}{III\hspace {1em}Extending}{clxxxiii}{part.3}
\contentsline {chapter}{Shiny Web Applications}{clxxxv}{chapter*.16}
\contentsline {section}{\numberline {0.32}Introduction}{clxxxv}{section.0.32}
\contentsline {section}{\numberline {0.33}Step 1. Defining the R Code in the backend of the Shiny app}{clxxxv}{section.0.33}
\contentsline {section}{\numberline {0.34}Step 2: User Interface (UI) / Frontend}{clxxxviii}{section.0.34}
\contentsline {section}{\numberline {0.35}Step 3: Implementing the backend (server)}{cxc}{section.0.35}
\contentsline {section}{\numberline {0.36}Step 4: Connecting frontend and backend}{cxci}{section.0.36}
\contentsline {section}{\numberline {0.37}Step 5: Customize}{cxcii}{section.0.37}
\contentsline {section}{\numberline {0.38}Example: Monte-Carlo Integration}{cxciii}{section.0.38}
\contentsline {section}{\numberline {0.39}Example: Buffon's needle}{cxciii}{section.0.39}
\contentsline {subsection}{\numberline {0.39.1}Step 1: Backend}{cxcvii}{subsection.0.39.1}
\contentsline {subsection}{\numberline {0.39.2}Step 2: Frontend}{cciii}{subsection.0.39.2}
\contentsline {subsection}{\numberline {0.39.3}Step 3: Connecting frontend and backend}{ccviii}{subsection.0.39.3}
\contentsline {chapter}{R Packages}{ccxv}{chapter*.20}
\contentsline {section}{\numberline {0.40}Basic steps}{ccxix}{section.0.40}
\contentsline {subsection}{\numberline {0.40.1}Step 1: Create an ``empty'' R package}{ccxix}{subsection.0.40.1}
\contentsline {subsection}{\numberline {0.40.2}Step 2: Edit description file}{ccxxiii}{subsection.0.40.2}
\contentsline {subsection}{\numberline {0.40.3}Step 3: Move your R scripts into the R folder}{ccxxv}{subsection.0.40.3}
\contentsline {subsection}{\numberline {0.40.4}Step 4: Documentation}{ccxxvi}{subsection.0.40.4}
\contentsline {subsection}{\numberline {0.40.5}Step 5: Test your package}{ccxxxi}{subsection.0.40.5}
\contentsline {subsection}{\numberline {0.40.6}Step 6: Add a ``README.Rmd'' file}{ccxxxiii}{subsection.0.40.6}
\contentsline {subsection}{\numberline {0.40.7}Step 7: Create a github repo - possibly with the same name as package}{ccxxxiv}{subsection.0.40.7}
\contentsline {section}{\numberline {0.41}Advanced}{ccxxxvii}{section.0.41}
\contentsline {subsection}{\numberline {0.41.1}Adding a shiny app}{ccxxxvii}{subsection.0.41.1}
\contentsline {subsection}{\numberline {0.41.2}Custom website}{ccxl}{subsection.0.41.2}
\contentsline {chapter}{High performance computing}{ccxli}{chapter*.24}
\contentsline {chapter}{Website creation}{ccxliii}{chapter*.25}
\contentsline {chapter}{Appendix}{ccxliii}{chapter*.25}
\contentsline {chapter}{Basic Probability and Statistics with \texttt {R}}{ccxlv}{appendix*.26}