Skip to content

Commit bc59e6d

Browse files
committed
Removed page breaks from HTML documents
1 parent c8e7771 commit bc59e6d

9 files changed

+263
-130
lines changed

2_RPROG/R Programming Course Notes.Rmd

Lines changed: 6 additions & 9 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
58
html_document:
69
highlight: pygments
710
theme: spacelab
811
toc: yes
9-
pdf_document:
10-
toc: yes
11-
toc_depth: 3
1212
---
1313
$\pagebreak$
1414

@@ -901,9 +901,6 @@ system.time({
901901
* ***Note**: R must be compiled with profiles support (generally the case)*
902902
* ***Note**: should NOT be used with system.time()*
903903

904-
905-
906-
907-
`ylim=range(unlist(rss))`
908-
909-
`ls("package:elasticnet")`
904+
### Miscellaneous
905+
* `unlist(rss)` = converts a list object into data frame/vector
906+
* `ls("package:elasticnet")` = list methods in package

2_RPROG/R_Programming_Course_Notes.html

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,13 @@ <h4 class="author"><em>Xing Su</em></h4>
133133
<li><a href="#optimization">Optimization</a></li>
134134
</ul></li>
135135
<li><a href="#debugging">Debugging</a></li>
136-
<li><a href="#r-profiler">R Profiler</a></li>
136+
<li><a href="#r-profiler">R Profiler</a><ul>
137+
<li><a href="#miscellaneous">Miscellaneous</a></li>
138+
</ul></li>
137139
</ul>
138140
</div>
139141

140-
<p><span class="math">\(\pagebreak\)</span></p>
142+
141143
<div id="overview-and-history-of-r" class="section level2">
142144
<h2>Overview and History of R</h2>
143145
<ul>
@@ -194,7 +196,7 @@ <h2>Overview and History of R</h2>
194196
<li>5000+ packages available</li>
195197
</ul></li>
196198
</ul>
197-
<p><span class="math">\(\pagebreak\)</span></p>
199+
198200
</div>
199201
<div id="coding-standards" class="section level2">
200202
<h2>Coding Standards</h2>
@@ -239,7 +241,7 @@ <h2>R Console and Evaluation</h2>
239241
</ul></li>
240242
<li><code>[1]</code> at the beginning of the output = which element of the vector is being shown</li>
241243
</ul>
242-
<p><span class="math">\(\pagebreak\)</span></p>
244+
243245
</div>
244246
<div id="r-objects-and-data-structures" class="section level2">
245247
<h2>R Objects and Data Structures</h2>
@@ -445,7 +447,7 @@ <h3>Factors</h3>
445447
<li><code>table(factorVar)</code> = how many of each are in the factor</li>
446448
</ul></li>
447449
</ul>
448-
<p><span class="math">\(\pagebreak\)</span></p>
450+
449451
</div>
450452
</div>
451453
<div id="missing-values" class="section level2">
@@ -481,7 +483,7 @@ <h2>Missing Values</h2>
481483
</ul></li>
482484
<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>
483485
</ul>
484-
<p><span class="math">\(\pagebreak\)</span></p>
486+
485487
</div>
486488
<div id="sequence-of-numbers" class="section level2">
487489
<h2>Sequence of Numbers</h2>
@@ -579,7 +581,7 @@ <h3>Partial Matching</h3>
579581
<li>x[[“a”, exact = false]]</li>
580582
</ul></li>
581583
</ul>
582-
<p><span class="math">\(\pagebreak\)</span></p>
584+
583585
</div>
584586
</div>
585587
<div id="logic" class="section level2">
@@ -628,7 +630,7 @@ <h2>Understanding Data</h2>
628630
</ul></li>
629631
<li><code>View(data.frame)</code> = opens and view the content of the data frame</li>
630632
</ul>
631-
<p><span class="math">\(\pagebreak\)</span></p>
633+
632634
</div>
633635
<div id="split-apply-combine-funtions" class="section level2">
634636
<h2>Split-Apply-Combine Funtions</h2>
@@ -786,7 +788,7 @@ <h3><code>aggregate()</code></h3>
786788
<li><code>na.rm = TRUE</code> –&gt; removes NA values</li>
787789
</ul></li>
788790
</ul>
789-
<p><span class="math">\(\pagebreak\)</span></p>
791+
790792
</div>
791793
</div>
792794
<div id="simulation" class="section level2">
@@ -880,7 +882,7 @@ <h3>Generate Numbers for a Linear Model</h3>
880882
<pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> </span><span class="kw">rnorm</span>(<span class="dv">100</span>)
881883
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
882884
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>
883-
<p><span class="math">\(\pagebreak\)</span></p>
885+
884886
</div>
885887
</div>
886888
<div id="dates-and-times" class="section level2">
@@ -921,7 +923,7 @@ <h2>Base Graphics</h2>
921923
<li><code>break = 100</code> = split data into 100 bins</li>
922924
</ul></li>
923925
</ul>
924-
<p><span class="math">\(\pagebreak\)</span></p>
926+
925927
</div>
926928
<div id="reading-tabular-data" class="section level2">
927929
<h2>Reading Tabular Data</h2>
@@ -1009,7 +1011,7 @@ <h3>Interfaces to the Outside World</h3>
10091011
</ul></li>
10101012
</ul></li>
10111013
</ul>
1012-
<p><span class="math">\(\pagebreak\)</span></p>
1014+
10131015
</div>
10141016
</div>
10151017
<div id="control-structures" class="section level2">
@@ -1116,7 +1118,7 @@ <h3><code>next</code> and <code>return</code></h3>
11161118
}
11171119
## Do something here
11181120
}</code></pre>
1119-
<p><span class="math">\(\pagebreak\)</span></p>
1121+
11201122
</div>
11211123
</div>
11221124
<div id="functions" class="section level2">
@@ -1171,7 +1173,7 @@ <h2>Functions</h2>
11711173
<li><em><strong>Note</strong>: arguments coming after … must be explicitly matched and cannot be partially matched</em></li>
11721174
</ul></li>
11731175
</ul>
1174-
<p><span class="math">\(\pagebreak\)</span></p>
1176+
11751177
</div>
11761178
<div id="scoping" class="section level2">
11771179
<h2>Scoping</h2>
@@ -1309,7 +1311,7 @@ <h3>Optimization</h3>
13091311
## b &lt;- -0.5*sum((data-mu)^2) / (sigma^2)
13101312
## -(a + b)
13111313
## }
1312-
## &lt;environment: 0x7fb869178030&gt;</code></pre>
1314+
## &lt;environment: 0x7fc51d30b668&gt;</code></pre>
13131315
<pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Estimating Prameters</span>
13141316
<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>
13151317
<pre><code>## mu sigma
@@ -1322,7 +1324,7 @@ <h3>Optimization</h3>
13221324
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>))
13231325
<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>
13241326
<pre><code>## [1] 1.800596</code></pre>
1325-
<p><span class="math">\(\pagebreak\)</span></p>
1327+
13261328
</div>
13271329
</div>
13281330
<div id="debugging" class="section level2">
@@ -1377,7 +1379,7 @@ <h2>R Profiler</h2>
13771379
}
13781380
})</code></pre>
13791381
<pre><code>## user system elapsed
1380-
## 0.143 0.003 0.150</code></pre>
1382+
## 0.150 0.005 0.170</code></pre>
13811383
<ul>
13821384
<li><code>system.time(expression)</code>
13831385
<ul>
@@ -1426,8 +1428,13 @@ <h2>R Profiler</h2>
14261428
<li><em><strong>Note</strong>: R must be compiled with profiles support (generally the case)</em></li>
14271429
<li><em><strong>Note</strong>: should NOT be used with system.time()</em></li>
14281430
</ul>
1429-
<p><code>ylim=range(unlist(rss))</code></p>
1430-
<p><code>ls(&quot;package:elasticnet&quot;)</code></p>
1431+
<div id="miscellaneous" class="section level3">
1432+
<h3>Miscellaneous</h3>
1433+
<ul>
1434+
<li><code>unlist(rss)</code> = converts a list object into data frame/vector</li>
1435+
<li><code>ls(&quot;package:elasticnet&quot;)</code> = list methods in package</li>
1436+
</ul>
1437+
</div>
14311438
</div>
14321439

14331440

138 Bytes
Binary file not shown.

3_GETDATA/Getting_and_Cleaning_Data_Course_Notes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ <h4 class="author"><em>Xing Su</em></h4>
8080
</ul>
8181
</div>
8282

83-
<p><span class="math">\(\pagebreak\)</span></p>
83+
8484
<div id="overview" class="section level2">
8585
<h2>Overview</h2>
8686
<ul>

4_EXDATA/Exploratory_Data_Analysis_Course_Notes.html

Lines changed: 10 additions & 10 deletions
Large diffs are not rendered by default.

5_REPDATA/Repreducible_Research_Course_Notes.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ <h4 class="author"><em>Xing Su</em></h4>
125125
</ul>
126126
</div>
127127

128-
<p><span class="math">\(\pagebreak\)</span></p>
128+
129129
<div id="replication" class="section level2">
130130
<h2>Replication</h2>
131131
<ul>
@@ -433,7 +433,7 @@ <h3>Create Reproducible Code</h3>
433433
</ul></li>
434434
<li>ensure all analysis is reproducible (standard that most data analysis are judged on)</li>
435435
</ul>
436-
<p><span class="math">\(\pagebreak\)</span></p>
436+
437437
</div>
438438
</div>
439439
<div id="organizing-data-analysis" class="section level2">
@@ -653,7 +653,7 @@ <h2>R Markdown</h2>
653653
<li><em><strong>Note</strong>: author should NOT edit/save the .md or .mtml document until you are done with the document </em></li>
654654
</ul></li>
655655
</ul>
656-
<p><span class="math">\(\pagebreak\)</span></p>
656+
657657
</div>
658658
<div id="communicating-results" class="section level2">
659659
<h2>Communicating Results</h2>
@@ -691,7 +691,7 @@ <h3><a href="http://rpubs.com/">RPubs</a></h3>
691691
<li>after kniting the R Markdown file in HTML, you can click on <strong>Publish</strong> to publish the HTML document on RPubs</li>
692692
<li><em><strong>Note</strong>: all publications to RPups are publicly available immediately</em></li>
693693
</ul>
694-
<p><span class="math">\(\pagebreak\)</span></p>
694+
695695
</div>
696696
</div>
697697
<div id="reproducible-research-checklist" class="section level2">
@@ -820,7 +820,7 @@ <h3>Don’ts</h3>
820820
<li>should save the <strong>data/code</strong> instead of the output</li>
821821
</ul></li>
822822
</ul>
823-
<p><span class="math">\(\pagebreak\)</span></p>
823+
824824
</div>
825825
</div>
826826
<div id="replication-vs-reproducibility" class="section level2">
@@ -916,7 +916,7 @@ <h3>Evidence-based Data Analysis</h3>
916916
<li>gives reviewers an important tool without dramatically increasing the burden on them</li>
917917
<li>allows more effort to be focused on improving the quality of “upstream” aspects of scientific research</li>
918918
</ul>
919-
<p><span class="math">\(\pagebreak\)</span></p>
919+
920920
</div>
921921
</div>
922922
<div id="caching-computations" class="section level2">
@@ -1068,7 +1068,7 @@ <h3><code>cacher</code> Package</h3>
10681068
<span class="co"># output:</span>
10691069
<span class="co"># / transferring cache db file 81b6dc23736f3d72c6...</span>
10701070
<span class="co"># [1] 0.000052457</span></code></pre>
1071-
<p><span class="math">\(\pagebreak\)</span></p>
1071+
10721072
</div>
10731073
</div>
10741074
<div id="case-study-air-pollution" class="section level2">
@@ -1109,7 +1109,7 @@ <h3>Analysis: Does Nickel Make PM Toxic?</h3>
11091109
<li>reproducibility of NMMAPS allowed for a secondary analysis (and linking with PM chemical constituent data) investigating a novel hypothesis (Lippmann <em>et al.</em>), as well as a critique of that analysis and new findings (Dominici <em>et al.</em>)</li>
11101110
<li>original hypothesis not necessarily invalidated, but evidence not as strong as originally suggested (more work should be done)</li>
11111111
</ul>
1112-
<p><span class="math">\(\pagebreak\)</span></p>
1112+
11131113
</div>
11141114
</div>
11151115
<div id="case-study-high-throughput-biology" class="section level2">

0 commit comments

Comments
 (0)