improve polls and update for Nov 2024

This commit is contained in:
Natalie Elphick 2024-11-08 15:30:41 -08:00
parent f6305c4141
commit 73777222a9
5 changed files with 171 additions and 187 deletions

View file

@ -2572,7 +2572,7 @@ class CountdownTimer {
<h1 class="title">Introduction to R Data Analysis</h1>
<h1 class="subtitle">Part 1</h1>
<h2 class="author">Natalie Elphick</h2>
<h3 class="date">August 26th, 2024</h3>
<h3 class="date">November 11th, 2024</h3>
</section>
<section id="section" class="slide level2">
@ -2585,8 +2585,6 @@ class CountdownTimer {
<h2>Introductions</h2>
<p><strong>Natalie Elphick</strong><br />
Bioinformatician I</p>
<p><strong>Min-Gyoung Shin</strong><br />
Bioinformatician III</p>
</section>
<section id="poll-1" class="slide level2">
<h2>Poll 1</h2>
@ -2858,7 +2856,6 @@ one style of names</li>
<li>Logical
<ul>
<li>Boolean (TRUE, FALSE)</li>
<li>NA (missing data)</li>
</ul></li>
<li>Character
<ul>
@ -2867,15 +2864,24 @@ one style of names</li>
</ul></li>
</ul>
</section>
<section id="missing-values" class="slide level2">
<h2>Missing Values</h2>
<ul>
<li>R has a special data type - NA which represents missing data</li>
<li>NAs can take the place of any type but by default are logical</li>
</ul>
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="cn">NA</span> <span class="sc">+</span> <span class="dv">1</span></span></code></pre></div>
<pre><code>[1] NA</code></pre>
</section>
<section id="poll-3" class="slide level2">
<h2>Poll 3</h2>
<p><strong>Which of these is not the correct data type for the
value?</strong></p>
<ol type="1">
<li>1.5 - Numeric</li>
<li>“1” - Character</li>
<li>NA - Logical</li>
<li>1 - Integer</li>
<li>1.5 - Numeric</li>
<li>A” - Character</li>
<li>1L - Integer</li>
<li>TRUE - Boolean</li>
</ol>
</section>
<section id="data-structures" class="slide level2">
@ -2915,7 +2921,7 @@ types/structures</strong> (ex. nested lists)</li>
<section id="min-break" class="title-slide slide level1">
<h1>10 min break</h1>
<center>
<div class="countdown" id="timer_1497287f" data-update-every="1" tabindex="0" style="right:0;bottom:0;margin:5%;padding:50px;font-size:5em;position: relative; width: min-content;">
<div class="countdown" id="timer_1fd2ccf2" data-update-every="1" tabindex="0" style="right:0;bottom:0;margin:5%;padding:50px;font-size:5em;position: relative; width: min-content;">
<div class="countdown-controls"><button class="countdown-bump-down"></button><button class="countdown-bump-up">+</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">10</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
@ -2934,44 +2940,44 @@ types/structures</strong> (ex. nested lists)</li>
mean( ), median( ), mode( ) )</li>
<li>Relational comparison operators to compare values</li>
</ul>
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a>x <span class="sc">==</span> y <span class="co"># Equal to</span></span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a>x <span class="sc">!=</span> y <span class="co"># Not equal to</span></span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a>x <span class="sc">&lt;</span> y <span class="co"># Less than</span></span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a>x <span class="sc">&gt;</span> y <span class="co"># Greater than</span></span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a>x <span class="sc">&lt;=</span> y <span class="co"># Less than or equal to</span></span>
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a>x <span class="sc">&gt;=</span> y <span class="co"># Greater than or equal to</span></span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a>x <span class="sc">%in%</span> y <span class="co"># Is x in this vector y?</span></span></code></pre></div>
</section>
<section id="poll-4" class="slide level2">
<h2>Poll 4</h2>
<p><strong>What is the output of the following code?</strong></p>
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="dv">4</span> <span class="sc">%in%</span> <span class="fu">c</span>(<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>)</span></code></pre></div>
<ol type="1">
<li>TRUE</li>
<li>FALSE</li>
<li>NA</li>
</ol>
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a>x <span class="sc">==</span> y <span class="co"># Equal to</span></span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a>x <span class="sc">!=</span> y <span class="co"># Not equal to</span></span>
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a>x <span class="sc">&lt;</span> y <span class="co"># Less than</span></span>
<span id="cb14-4"><a href="#cb14-4" aria-hidden="true" tabindex="-1"></a>x <span class="sc">&gt;</span> y <span class="co"># Greater than</span></span>
<span id="cb14-5"><a href="#cb14-5" aria-hidden="true" tabindex="-1"></a>x <span class="sc">&lt;=</span> y <span class="co"># Less than or equal to</span></span>
<span id="cb14-6"><a href="#cb14-6" aria-hidden="true" tabindex="-1"></a>x <span class="sc">&gt;=</span> y <span class="co"># Greater than or equal to</span></span>
<span id="cb14-7"><a href="#cb14-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb14-8"><a href="#cb14-8" aria-hidden="true" tabindex="-1"></a>x <span class="sc">%in%</span> y <span class="co"># Is x in this vector y?</span></span></code></pre></div>
</section>
<section id="logical-operators" class="slide level2">
<h2>Logical Operators</h2>
<ul>
<li>Logical operators can compare TRUE or FALSE values</li>
</ul>
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="cn">TRUE</span></span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a>y <span class="ot">&lt;-</span> <span class="cn">FALSE</span></span>
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb14-4"><a href="#cb14-4" aria-hidden="true" tabindex="-1"></a><span class="sc">!</span>x <span class="co"># Not x</span></span>
<span id="cb14-5"><a href="#cb14-5" aria-hidden="true" tabindex="-1"></a>x <span class="sc">|</span> y <span class="co"># x or y</span></span>
<span id="cb14-6"><a href="#cb14-6" aria-hidden="true" tabindex="-1"></a>x <span class="sc">&amp;</span> y <span class="co"># x and y</span></span></code></pre></div>
<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="cn">TRUE</span></span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a>y <span class="ot">&lt;-</span> <span class="cn">FALSE</span></span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a><span class="sc">!</span>x <span class="co"># Not x</span></span>
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true" tabindex="-1"></a>x <span class="sc">|</span> y <span class="co"># x or y</span></span>
<span id="cb15-6"><a href="#cb15-6" aria-hidden="true" tabindex="-1"></a>x <span class="sc">&amp;</span> y <span class="co"># x and y</span></span></code></pre></div>
</section>
<section id="poll-4" class="slide level2">
<h2>Poll 4</h2>
<p><strong>What is the output of the following code?</strong></p>
<div class="sourceCode" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="dv">2</span> <span class="sc">+</span> <span class="dv">2</span> <span class="sc">==</span> <span class="dv">4</span> <span class="sc">&amp;</span> <span class="dv">8</span> <span class="sc">+</span> <span class="dv">10</span> <span class="sc">&lt;</span> <span class="dv">20</span></span></code></pre></div>
<ol type="1">
<li>TRUE</li>
<li>FALSE</li>
<li>NA</li>
</ol>
</section>
<section id="poll-5" class="slide level2">
<h2>Poll 5</h2>
<p><strong>What is the output of the following code?</strong></p>
<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="cn">TRUE</span></span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a>y <span class="ot">&lt;-</span> <span class="cn">FALSE</span></span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a>x <span class="sc">&amp;</span> <span class="sc">!</span>y</span></code></pre></div>
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="cn">TRUE</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a>y <span class="ot">&lt;-</span> <span class="cn">FALSE</span></span>
<span id="cb17-3"><a href="#cb17-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb17-4"><a href="#cb17-4" aria-hidden="true" tabindex="-1"></a>y <span class="sc">|</span> (y <span class="sc">|</span> x)</span></code></pre></div>
<ol type="1">
<li>TRUE</li>
<li>FALSE</li>
@ -2984,17 +2990,17 @@ mean( ), median( ), mode( ) )</li>
<li>Relational and logical operations allow for conditional execution of
code</li>
</ul>
<div class="sourceCode" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a>dog_breeds <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">&quot;Labrador Retriever&quot;</span>, <span class="st">&quot;Akita&quot;</span>, <span class="st">&quot;Bulldog&quot;</span>)</span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb16-3"><a href="#cb16-3" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> (<span class="st">&quot;Akita&quot;</span> <span class="sc">%in%</span> dog_breeds) {</span>
<span id="cb16-4"><a href="#cb16-4" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb16-5"><a href="#cb16-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">print</span>(<span class="st">&quot;dog_breeds already contains Akita&quot;</span>)</span>
<span id="cb16-6"><a href="#cb16-6" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb16-7"><a href="#cb16-7" aria-hidden="true" tabindex="-1"></a>} <span class="cf">else</span> {</span>
<span id="cb16-8"><a href="#cb16-8" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb16-9"><a href="#cb16-9" aria-hidden="true" tabindex="-1"></a> dog_breeds <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">&quot;Akita&quot;</span>, dog_breeds)</span>
<span id="cb16-10"><a href="#cb16-10" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb16-11"><a href="#cb16-11" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<div class="sourceCode" id="cb18"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>dog_breeds <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">&quot;Labrador Retriever&quot;</span>, <span class="st">&quot;Akita&quot;</span>, <span class="st">&quot;Bulldog&quot;</span>)</span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb18-3"><a href="#cb18-3" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> (<span class="st">&quot;Akita&quot;</span> <span class="sc">%in%</span> dog_breeds) {</span>
<span id="cb18-4"><a href="#cb18-4" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb18-5"><a href="#cb18-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">print</span>(<span class="st">&quot;dog_breeds already contains Akita&quot;</span>)</span>
<span id="cb18-6"><a href="#cb18-6" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb18-7"><a href="#cb18-7" aria-hidden="true" tabindex="-1"></a>} <span class="cf">else</span> {</span>
<span id="cb18-8"><a href="#cb18-8" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb18-9"><a href="#cb18-9" aria-hidden="true" tabindex="-1"></a> dog_breeds <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">&quot;Akita&quot;</span>, dog_breeds)</span>
<span id="cb18-10"><a href="#cb18-10" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb18-11"><a href="#cb18-11" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<pre><code>[1] &quot;dog_breeds already contains Akita&quot;</code></pre>
</section></section>
<section>
@ -3019,39 +3025,39 @@ R</strong> functions</li>
<li>To define a function we use the function keyword, the output is
specified with the <strong>return</strong> function:</li>
</ul>
<div class="sourceCode" id="cb18"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>add_dog <span class="ot">&lt;-</span> <span class="cf">function</span>(dog_to_add, input_vector) {</span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (dog_to_add <span class="sc">%in%</span> input_vector) {</span>
<span id="cb18-3"><a href="#cb18-3" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb18-4"><a href="#cb18-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">print</span>(<span class="st">&quot;Already contains this dog&quot;</span>)</span>
<span id="cb18-5"><a href="#cb18-5" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb18-6"><a href="#cb18-6" aria-hidden="true" tabindex="-1"></a> } <span class="cf">else</span> {</span>
<span id="cb18-7"><a href="#cb18-7" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb18-8"><a href="#cb18-8" aria-hidden="true" tabindex="-1"></a> output <span class="ot">&lt;-</span> <span class="fu">c</span>(dog_to_add, input_vector)</span>
<span id="cb18-9"><a href="#cb18-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">return</span>(output)</span>
<span id="cb18-10"><a href="#cb18-10" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb18-11"><a href="#cb18-11" aria-hidden="true" tabindex="-1"></a> }</span>
<span id="cb18-12"><a href="#cb18-12" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a>add_dog <span class="ot">&lt;-</span> <span class="cf">function</span>(dog_to_add, input_vector) {</span>
<span id="cb20-2"><a href="#cb20-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (dog_to_add <span class="sc">%in%</span> input_vector) {</span>
<span id="cb20-3"><a href="#cb20-3" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb20-4"><a href="#cb20-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">print</span>(<span class="st">&quot;Already contains this dog&quot;</span>)</span>
<span id="cb20-5"><a href="#cb20-5" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb20-6"><a href="#cb20-6" aria-hidden="true" tabindex="-1"></a> } <span class="cf">else</span> {</span>
<span id="cb20-7"><a href="#cb20-7" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb20-8"><a href="#cb20-8" aria-hidden="true" tabindex="-1"></a> output <span class="ot">&lt;-</span> <span class="fu">c</span>(dog_to_add, input_vector)</span>
<span id="cb20-9"><a href="#cb20-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">return</span>(output)</span>
<span id="cb20-10"><a href="#cb20-10" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb20-11"><a href="#cb20-11" aria-hidden="true" tabindex="-1"></a> }</span>
<span id="cb20-12"><a href="#cb20-12" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
</section>
<section id="example-1" class="slide level2">
<h2>Example</h2>
<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="fu">add_dog</span>(<span class="at">dog_to_add =</span> <span class="st">&quot;Akita&quot;</span>,</span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a> <span class="at">input_vector =</span> dog_breeds)</span></code></pre></div>
<pre><code>[1] &quot;Already contains this dog&quot;</code></pre>
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="fu">add_dog</span>(<span class="at">dog_to_add =</span> <span class="st">&quot;German Shepard&quot;</span>,</span>
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="fu">add_dog</span>(<span class="at">dog_to_add =</span> <span class="st">&quot;Akita&quot;</span>,</span>
<span id="cb21-2"><a href="#cb21-2" aria-hidden="true" tabindex="-1"></a> <span class="at">input_vector =</span> dog_breeds)</span></code></pre></div>
<pre><code>[1] &quot;Already contains this dog&quot;</code></pre>
<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="fu">add_dog</span>(<span class="at">dog_to_add =</span> <span class="st">&quot;German Shepard&quot;</span>,</span>
<span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a> <span class="at">input_vector =</span> dog_breeds)</span></code></pre></div>
<pre><code>[1] &quot;German Shepard&quot; &quot;Labrador Retriever&quot; &quot;Akita&quot;
[4] &quot;Bulldog&quot; </code></pre>
</section>
<section id="poll-6" class="slide level2">
<h2>Poll 6</h2>
<p><strong>What does this function do?</strong></p>
<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a>mystery_function <span class="ot">&lt;-</span> <span class="cf">function</span>(x) {</span>
<span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (x <span class="sc">&gt;</span> <span class="dv">0</span>) {</span>
<span id="cb23-3"><a href="#cb23-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">return</span>(x)</span>
<span id="cb23-4"><a href="#cb23-4" aria-hidden="true" tabindex="-1"></a> } <span class="cf">else</span> {</span>
<span id="cb23-5"><a href="#cb23-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">return</span>(<span class="sc">-</span>x)</span>
<span id="cb23-6"><a href="#cb23-6" aria-hidden="true" tabindex="-1"></a> }</span>
<span id="cb23-7"><a href="#cb23-7" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a>mystery_function <span class="ot">&lt;-</span> <span class="cf">function</span>(x) {</span>
<span id="cb25-2"><a href="#cb25-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (x <span class="sc">&gt;</span> <span class="dv">0</span>) {</span>
<span id="cb25-3"><a href="#cb25-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">return</span>(x)</span>
<span id="cb25-4"><a href="#cb25-4" aria-hidden="true" tabindex="-1"></a> } <span class="cf">else</span> {</span>
<span id="cb25-5"><a href="#cb25-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">return</span>(<span class="sc">-</span>x)</span>
<span id="cb25-6"><a href="#cb25-6" aria-hidden="true" tabindex="-1"></a> }</span>
<span id="cb25-7"><a href="#cb25-7" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<ol type="1">
<li>Returns the absolute value of x</li>
<li>Returns x</li>
@ -3070,7 +3076,7 @@ specified with the <strong>return</strong> function:</li>
<li>Packages are collections of functions that are specialized to a
specific task (plotting, data manipulation etc.)</li>
</ul>
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(ggplot2) <span class="co"># Makes all of the ggplot2 functions available</span></span></code></pre></div>
<div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(ggplot2) <span class="co"># Makes all of the ggplot2 functions available</span></span></code></pre></div>
<ul>
<li>The tidyverse is a collection of commonly used data analysis
packages
@ -3110,15 +3116,15 @@ can continue to improve these workshops</li>
</section>
<section id="upcoming-workshops" class="slide level2">
<h2>Upcoming Workshops</h2>
<p><a href="https://gladstone.org/events/intermediate-rna-seq-analysis-using-r-5">Intermediate
RNA-Seq Analysis Using R</a><br />
September 10, 2024 9am-12pm PDT</p>
<p><a href="https://gladstone.org/events/introduction-statistics-experimental-design-and-hypothesis-testing-1">Introduction
to Statistics, Experimental Design, and Hypothesis Testing</a><br />
September 10 - September 12, 2024 1-3pm PDT</p>
<p><a href="https://gladstone.org/events/single-cell-rna-seq-data-analysis-0">Single
Cell RNA-Seq Data Analysis</a><br />
September 16-September 17, 2024 9am-4pm PDT</p>
<p><a href="https://gladstone.org/events/introduction-scatac-seq-data-analysis">Introduction
to scATAC-seq Data Analysis</a><br />
November 14 - November 15, 2024 1:00-4:00pm PST</p>
<p><a href="https://gladstone.org/events/introduction-linear-mixed-effects-models-0">Introduction
to Linear Mixed Effects Models</a><br />
November 18-November 19, 2024 1:00-3:00pm PST</p>
<p><a href="https://gladstone.org/events/scatac-seq-and-scrna-seq-data-integration">scATAC-seq
and scRNA-seq Data Integration</a><br />
November 22, 2024 1:00-4:00pm PST</p>
<ul>
<li>Check <a href="https://gladstone.org/events?series=data-science-training-program">this
link</a> at for the full schedule</li>

View file

@ -2809,10 +2809,8 @@ border: 0;
<h1>Introductions</h1>
<p><strong>Natalie Elphick</strong><br />
Bioinformatician I</p>
<p><strong>Michela Traglia</strong><br />
Senior Statistician</p>
<p><strong>Ayushi Agrawal</strong><br />
Bioinformatician III</p>
<p><strong>Reuben Thomas</strong><br />
Associate Core Director</p>
</section>
<section id="schedule" class="title-slide slide level1">
@ -3048,7 +3046,7 @@ modified by adding layers</li>
<section id="min-break" class="title-slide slide level1">
<h1>10 min break</h1>
<center>
<div class="countdown" id="timer_dfe5910e" data-update-every="1" tabindex="0" style="right:0;bottom:0;margin:5%;padding:50px;font-size:5em;position: relative; width: min-content;">
<div class="countdown" id="timer_786cfcf4" data-update-every="1" tabindex="0" style="right:0;bottom:0;margin:5%;padding:50px;font-size:5em;position: relative; width: min-content;">
<div class="countdown-controls"><button class="countdown-bump-down"></button><button class="countdown-bump-up">+</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">10</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
@ -4624,8 +4622,23 @@ reach out to the authors using their preferred method</li>
<h1>Additional Resources</h1>
</section>
<section id="r" class="slide level2">
<h2>R</h2>
<section id="coding-templates" class="slide level2">
<h2>Coding Templates</h2>
<p>Code templates can be used to avoid typing the same code over and
over again.</p>
<ul>
<li>These are templates that we are using to automate things like plot
appearance and documentation:
<ul>
<li><a href="https://www.dropbox.com/scl/fi/a9cnyqdajgabbfcxbmm6y/RMD_template.Rmd?rlkey=yntfpo6aptw9b4pgjyzpe5ubi&amp;dl=1">.Rmd
Template</a></li>
<li><a href="https://www.dropbox.com/scl/fi/cy43b8b1x3nzn17esnmmt/Rscript_template.R?rlkey=zn7b0g8nn0s9213blh70fjjsx&amp;dl=1">.R
Script Template</a></li>
</ul></li>
</ul>
</section>
<section id="r-resources" class="slide level2">
<h2>R Resources</h2>
<ul>
<li><a href="https://r4ds.hadley.nz/">R for Data Science</a></li>
<li><a href="https://statsandr.com/blog/top-10-errors-in-r/">Top 10 R
@ -4636,41 +4649,6 @@ Markdown: The Definitive Guide</a></li>
data analysis</a></li>
<li><a href="https://adv-r.hadley.nz/">Advanced R</a></li>
</ul>
</section>
<section id="statistics" class="slide level2">
<h2>Statistics</h2>
<ul>
<li><a href="https://bookdown.org/steve_midway/DAR">Data Analysis in
R</a> : This book has more statistics details than <em>R for Data
Science</em></li>
<li><a href="https://bookdown.org/steve_midway/DAR/glms-generalized-linear-models.html">Generalized
Linear Models</a><br />
</li>
<li><a href="https://bookdown.org/steve_midway/DAR/random-effects.html">Random
Effects</a></li>
</ul>
</section>
<section id="rna-seq-analysis" class="slide level2">
<h2>RNA-seq Analysis</h2>
<ul>
<li><a href="https://rnaseq.uoregon.edu/">RNA-seqlopedia</a> :
Everything you need to know about RNA-seq experiments</li>
<li><a href="https://luisvalesilva.com/datasimple/rna-seq_units.html">RNA-seq
Expression Units</a> : Blog post on understanding common units</li>
<li><a href="https://bioconductor.org/books/3.17/OSCA.intro/index.html">Introduction
to Single-Cell Analysis with Bioconductor</a> : Covers the basics of
scRNA-seq analysis in R</li>
</ul>
</section>
<section id="dimensional-reduction" class="slide level2">
<h2>Dimensional Reduction</h2>
<ul>
<li><a href="https://uw.pressbooks.pub/appliedmultivariatestatistics/chapter/pca/">Tutorial
on PCA</a> : PCA explained with R code examples</li>
<li><a href="https://pair-code.github.io/understanding-umap/">Understanding
UMAP</a> : Short explanation with great visualizations, mainly useful
for scRNA-seq analysis</li>
</ul>
</section></section>
<section>
<section id="end-of-part-2" class="title-slide slide level1">
@ -4686,15 +4664,15 @@ can continue to improve these workshops</li>
</section>
<section id="upcoming-workshops" class="slide level2">
<h2>Upcoming Workshops</h2>
<p><a href="https://gladstone.org/events/intermediate-rna-seq-analysis-using-r-5">Intermediate
RNA-Seq Analysis Using R</a><br />
September 10, 2024 9am-12pm PDT</p>
<p><a href="https://gladstone.org/events/introduction-statistics-experimental-design-and-hypothesis-testing-1">Introduction
to Statistics, Experimental Design, and Hypothesis Testing</a><br />
September 10 - September 12, 2024 1-3pm PDT</p>
<p><a href="https://gladstone.org/events/single-cell-rna-seq-data-analysis-0">Single
Cell RNA-Seq Data Analysis</a><br />
September 16-September 17, 2024 9am-4pm PDT</p>
<p><a href="https://gladstone.org/events/introduction-scatac-seq-data-analysis">Introduction
to scATAC-seq Data Analysis</a><br />
November 14 - November 15, 2024 1:00-4:00pm PST</p>
<p><a href="https://gladstone.org/events/introduction-linear-mixed-effects-models-0">Introduction
to Linear Mixed Effects Models</a><br />
November 18-November 19, 2024 1:00-3:00pm PST</p>
<p><a href="https://gladstone.org/events/scatac-seq-and-scrna-seq-data-integration">scATAC-seq
and scRNA-seq Data Integration</a><br />
November 22, 2024 1:00-4:00pm PST</p>
<ul>
<li>Check <a href="https://gladstone.org/events?series=data-science-training-program">this
link</a> at for the full schedule</li>