Skip to content

Commit e7bd74a

Browse files
committed
Updated file names and added table of contents for classes 1 and 2
1 parent ef5491b commit e7bd74a

8 files changed

+42
-39
lines changed

1_DATASCITOOLBOX/Data Scientists Toolbox Course Notes.Rmd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
---
22
title: "Data Scientist’s Toolbox Course Notes"
33
author: "Xing Su"
4-
output: pdf_document
4+
output:
5+
html_document:
6+
highlight: pygments
7+
theme: spacelab
8+
toc: yes
9+
pdf_document:
10+
toc: yes
11+
toc_depth: 3
512
---
613

14+
715
## CLI (Command Line Interface)
816

917
* `/` = root directory

1_DATASCITOOLBOX/Data_Scientists_Toolbox_Course_Notes.html

Lines changed: 14 additions & 19 deletions
Large diffs are not rendered by default.
1.43 KB
Binary file not shown.

2_RPROG/R Programming Course Notes.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
title: "R Programming Course Notes"
33
author: "Xing Su"
44
output:
5-
pdf_document:
6-
toc: yes
7-
toc_depth: 3
85
html_document:
96
highlight: pygments
107
theme: spacelab
118
toc: yes
9+
pdf_document:
10+
toc: yes
11+
toc_depth: 3
1212
---
1313
$\pagebreak$
1414

2_RPROG/R_Programming_Course_Notes.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ <h4 class="author"><em>Xing Su</em></h4>
139139
</ul>
140140
</div>
141141

142-
142+
<p><span class="math">\(\pagebreak\)</span></p>
143143
<div id="overview-and-history-of-r" class="section level2">
144144
<h2>Overview and History of R</h2>
145145
<ul>
@@ -196,7 +196,7 @@ <h2>Overview and History of R</h2>
196196
<li>5000+ packages available</li>
197197
</ul></li>
198198
</ul>
199-
199+
<p><span class="math">\(\pagebreak\)</span></p>
200200
</div>
201201
<div id="coding-standards" class="section level2">
202202
<h2>Coding Standards</h2>
@@ -241,7 +241,7 @@ <h2>R Console and Evaluation</h2>
241241
</ul></li>
242242
<li><code>[1]</code> at the beginning of the output = which element of the vector is being shown</li>
243243
</ul>
244-
244+
<p><span class="math">\(\pagebreak\)</span></p>
245245
</div>
246246
<div id="r-objects-and-data-structures" class="section level2">
247247
<h2>R Objects and Data Structures</h2>
@@ -447,7 +447,7 @@ <h3>Factors</h3>
447447
<li><code>table(factorVar)</code> = how many of each are in the factor</li>
448448
</ul></li>
449449
</ul>
450-
450+
<p><span class="math">\(\pagebreak\)</span></p>
451451
</div>
452452
</div>
453453
<div id="missing-values" class="section level2">
@@ -483,7 +483,7 @@ <h2>Missing Values</h2>
483483
</ul></li>
484484
<li><p><strong>Imputing Missing Values</strong> = replacing missing values with estimates (can be averages from all other data with the similar conditions)</p></li>
485485
</ul>
486-
486+
<p><span class="math">\(\pagebreak\)</span></p>
487487
</div>
488488
<div id="sequence-of-numbers" class="section level2">
489489
<h2>Sequence of Numbers</h2>
@@ -581,7 +581,7 @@ <h3>Partial Matching</h3>
581581
<li>x[[“a”, exact = false]]</li>
582582
</ul></li>
583583
</ul>
584-
584+
<p><span class="math">\(\pagebreak\)</span></p>
585585
</div>
586586
</div>
587587
<div id="logic" class="section level2">
@@ -630,7 +630,7 @@ <h2>Understanding Data</h2>
630630
</ul></li>
631631
<li><code>View(data.frame)</code> = opens and view the content of the data frame</li>
632632
</ul>
633-
633+
<p><span class="math">\(\pagebreak\)</span></p>
634634
</div>
635635
<div id="split-apply-combine-funtions" class="section level2">
636636
<h2>Split-Apply-Combine Funtions</h2>
@@ -788,7 +788,7 @@ <h3><code>aggregate()</code></h3>
788788
<li><code>na.rm = TRUE</code> –&gt; removes NA values</li>
789789
</ul></li>
790790
</ul>
791-
791+
<p><span class="math">\(\pagebreak\)</span></p>
792792
</div>
793793
</div>
794794
<div id="simulation" class="section level2">
@@ -882,7 +882,7 @@ <h3>Generate Numbers for a Linear Model</h3>
882882
<pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> </span><span class="kw">rnorm</span>(<span class="dv">100</span>)
883883
log.mu &lt;-<span class="st"> </span><span class="fl">0.5</span> +<span class="st"> </span><span class="fl">0.3</span>*<span class="st"> </span>x
884884
y &lt;-<span class="st"> </span><span class="kw">rpois</span>(<span class="dv">100</span>, <span class="kw">exp</span>(log.mu))</code></pre>
885-
885+
<p><span class="math">\(\pagebreak\)</span></p>
886886
</div>
887887
</div>
888888
<div id="dates-and-times" class="section level2">
@@ -923,7 +923,7 @@ <h2>Base Graphics</h2>
923923
<li><code>break = 100</code> = split data into 100 bins</li>
924924
</ul></li>
925925
</ul>
926-
926+
<p><span class="math">\(\pagebreak\)</span></p>
927927
</div>
928928
<div id="reading-tabular-data" class="section level2">
929929
<h2>Reading Tabular Data</h2>
@@ -1011,7 +1011,7 @@ <h3>Interfaces to the Outside World</h3>
10111011
</ul></li>
10121012
</ul></li>
10131013
</ul>
1014-
1014+
<p><span class="math">\(\pagebreak\)</span></p>
10151015
</div>
10161016
</div>
10171017
<div id="control-structures" class="section level2">
@@ -1118,7 +1118,7 @@ <h3><code>next</code> and <code>return</code></h3>
11181118
}
11191119
## Do something here
11201120
}</code></pre>
1121-
1121+
<p><span class="math">\(\pagebreak\)</span></p>
11221122
</div>
11231123
</div>
11241124
<div id="functions" class="section level2">
@@ -1173,7 +1173,7 @@ <h2>Functions</h2>
11731173
<li><em><strong>Note</strong>: arguments coming after … must be explicitly matched and cannot be partially matched</em></li>
11741174
</ul></li>
11751175
</ul>
1176-
1176+
<p><span class="math">\(\pagebreak\)</span></p>
11771177
</div>
11781178
<div id="scoping" class="section level2">
11791179
<h2>Scoping</h2>
@@ -1311,7 +1311,7 @@ <h3>Optimization</h3>
13111311
## b &lt;- -0.5*sum((data-mu)^2) / (sigma^2)
13121312
## -(a + b)
13131313
## }
1314-
## &lt;environment: 0x7fc51d30b668&gt;</code></pre>
1314+
## &lt;environment: 0x7fb85d0fac68&gt;</code></pre>
13151315
<pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Estimating Prameters</span>
13161316
<span class="kw">optim</span>(<span class="kw">c</span>(<span class="dt">mu =</span> <span class="dv">0</span>, <span class="dt">sigma =</span> <span class="dv">1</span>), nLL)$par</code></pre>
13171317
<pre><code>## mu sigma
@@ -1324,7 +1324,7 @@ <h3>Optimization</h3>
13241324
nLL &lt;-<span class="st"> </span><span class="kw">make.NegLogLik</span>(normals, <span class="kw">c</span>(<span class="dv">1</span>, <span class="ot">FALSE</span>))
13251325
<span class="kw">optimize</span>(nLL, <span class="kw">c</span>(<span class="fl">1e-6</span>, <span class="dv">10</span>))$minimum</code></pre>
13261326
<pre><code>## [1] 1.800596</code></pre>
1327-
1327+
<p><span class="math">\(\pagebreak\)</span></p>
13281328
</div>
13291329
</div>
13301330
<div id="debugging" class="section level2">
@@ -1379,7 +1379,7 @@ <h2>R Profiler</h2>
13791379
}
13801380
})</code></pre>
13811381
<pre><code>## user system elapsed
1382-
## 0.150 0.005 0.170</code></pre>
1382+
## 0.152 0.004 0.162</code></pre>
13831383
<ul>
13841384
<li><code>system.time(expression)</code>
13851385
<ul>

0 commit comments

Comments
 (0)