Skip to content

Commit

Permalink
wrapped up edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mgimond committed Feb 5, 2024
1 parent 46e52ec commit ac045db
Show file tree
Hide file tree
Showing 99 changed files with 642 additions and 166 deletions.
12 changes: 6 additions & 6 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="author" content="Manny Gimond">
<meta name="dcterms.date" content="2024-02-03">
<meta name="dcterms.date" content="2024-02-05">

<title>Exploratory Data Analysis in R</title>
<style>
Expand Down Expand Up @@ -334,7 +334,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./robustness.html" class="sidebar-item-text sidebar-link">
<a href="./case_study.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">23</span>&nbsp; <span class="chapter-title">A working example: t-tests and re-expression</span></span></a>
</div>
</li>
Expand Down Expand Up @@ -457,7 +457,7 @@ <h1 class="title">Exploratory Data Analysis in R</h1>
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">February 3, 2024</p>
<p class="date">February 5, 2024</p>
</div>
</div>

Expand All @@ -471,13 +471,13 @@ <h1 class="title">Exploratory Data Analysis in R</h1>
<h1 class="unnumbered">Preface</h1>
<p>This book is a compilation of lecture notes used in an <em>Exploratory Data Analysis in R</em> course taught to undergraduates at Colby College. The course assumes little to no background in quantitative analysis nor in computer programming and was first taught in Spring, 2015. The course introduces students to data manipulation in R, data exploration (in the spirit of John Tukey’s EDA) and the R markdown language. Many of the visualization techniques are adopted from William Cleveland’s <em>Data Visualization</em> book.</p>
<p>The base R plotting environment and the <code>ggplot2</code> ecosystem are used throughout this book. While a chapter is dedicated to the <code>lattice</code> plotting package, its functions are not used outside of that chapter given that <code>ggplot2</code> offers many of <code>lattice</code>’s functionality.</p>
<p>While great effort is made to adopt a consist plotting environment throughout this book (this being <code>ggplot2</code>, for the most part), a few topics (including the q-q plot and the median polish) will benefit from custom plotting functions available in the <code>tukeyedar</code> package. The <a href="https://github.com/mgimond/tukeyedar/">package</a> can be downloaded from GitHub via the command:</p>
<div class="cell" data-hash="index_cache/html/unnamed-chunk-1_92abb4a22322b722d1af3b88b82b6e95">
<p>While great effort is made to adopt a consistent plotting environment throughout this book (this being <code>ggplot2</code>, for the most part), a few topics (including the q-q plot and the median polish) will benefit from custom plotting functions available in the <code>tukeyedar</code> package. The <a href="https://github.com/mgimond/tukeyedar/">package</a> can be downloaded from GitHub via the command:</p>
<div class="cell">
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>devtools<span class="sc">::</span><span class="fu">install_github</span>(<span class="st">"mgimond/tukeyedar"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>Note that installing the GitHub package will require that the <code>devtools</code> package be installed first.</p>
<p>Functions making use of the <code>tukeyedar</code> package will be highlighted in a peach/pink code block as opposed to the default light yellow code block used for all other code blocks. For example, if <code>tukeyedar</code>’s <code>eda_qq</code> function is used, the code block will take on the following appearance:</p>
<div class="cell" data-hash="index_cache/html/unnamed-chunk-2_7743d95d3556383c2327130315418249">
<div class="cell">
<div class="sourceCode cell-code" id="cb2"><pre class="sourceCode r eda code-with-copy"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(tukeyedar)</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="fu">eda_qq</span>(Tenor, Bass)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./robustness.html" class="sidebar-item-text sidebar-link">
<a href="./case_study.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">23</span>&nbsp; <span class="chapter-title">A working example: t-tests and re-expression</span></span></a>
</div>
</li>
Expand Down Expand Up @@ -650,7 +650,7 @@ <h3 data-number="1.3.4" class="anchored" data-anchor-id="reproducible-analysis">
<section id="creating-dynamic-documents-using-r-markdown" class="level2" data-number="1.4">
<h2 data-number="1.4" class="anchored" data-anchor-id="creating-dynamic-documents-using-r-markdown"><span class="header-section-number">1.4</span> Creating dynamic documents using R Markdown</h2>
<p>Another source of error in the write-up of a report or publication is the linking of tables, figures and statistical summaries to the write-up. Typically, one saves statistical plots as image files then loads the image into the document. However, the figures may have gone through many different iterations resulting in many different versions of the image file in a working folder. Add to this many other figures, data table files and statistical results from various pieces of software, one quickly realizes the potential for embedding the wrong image files in the document or embedding the wrong statistical summaries in the text. Furthermore, the researcher is then required to properly archive and document the provenance of each figure, data table or statistical summary resulting in a complex structure of files and directories in the project folder thus increasing the odds of an irreproducible analysis.</p>
<p>Confining all of the analysis to a scripting environment such as R can help, but this still does not alleviate the possibility of loading the wrong figure into the document, or forgetting to update a statistical summary in the text when the original data file was revised. A solution to this potential pitfall is to embed the actual analysis and graphic generation process into the document–such environments are called dynamic documents. In this course, we will use the <a href="http://rmarkdown.rstudio.com/">R Markdown authoring tool</a> which embeds R code into the document. An example of an R Markdown document is this course website which was entirely generated in RMarkdown!. You can view the R Markdown files <a href="https://github.com/mgimond/ES218">on this author’s GitHub repository</a>.</p>
<p>Confining all of the analysis to a scripting environment such as R can help, but this still does not alleviate the possibility of loading the wrong figure into the document, or forgetting to update a statistical summary in the text when the original data file was revised. A solution to this potential pitfall is to embed the actual analysis and graphic generation process into the document–such environments are called dynamic documents. In this course, we will use the <a href="http://rmarkdown.rstudio.com/">R Markdown authoring tool</a> which embeds R code into the document. An example of an R Markdown document is this course website which was entirely generated in RMarkdown! You can view the R Markdown files <a href="https://github.com/mgimond/ES218">on this author’s GitHub repository</a>.</p>


</section>
Expand Down
Loading

0 comments on commit ac045db

Please sign in to comment.