Skip to content

Commit

Permalink
Render site
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 14, 2025
1 parent 53c4105 commit eaa32a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions help.html
Original file line number Diff line number Diff line change
Expand Up @@ -347,14 +347,14 @@ <h2><strong>Why are my changes not taking effect? It’s making my results look
<p>Here we are creating a new object from an existing one:</p>
<pre class="r"><code>new_rivers &lt;- sample(rivers, 5)
new_rivers</code></pre>
<pre><code>## [1] 1054 135 265 246 890</code></pre>
<pre><code>## [1] 1100 380 525 383 270</code></pre>
<p>Using just this will only print the result and not actually change <code>new_rivers</code>:</p>
<pre class="r"><code>new_rivers + 1</code></pre>
<pre><code>## [1] 1055 136 266 247 891</code></pre>
<pre><code>## [1] 1101 381 526 384 271</code></pre>
<p>If we want to modify <code>new_rivers</code> and save that modified version, then we need to reassign <code>new_rivers</code> like so:</p>
<pre class="r"><code>new_rivers &lt;- new_rivers + 1
new_rivers</code></pre>
<pre><code>## [1] 1055 136 266 247 891</code></pre>
<pre><code>## [1] 1101 381 526 384 271</code></pre>
<p>If we forget to reassign this can cause subsequent steps to not work as expected because we will not be working with the data that has been modified.</p>
<hr />
</div>
Expand Down Expand Up @@ -403,7 +403,7 @@ <h2><strong>Error: object ‘X’ not found</strong></h2>
<p>Make sure you run something like this, with the <code>&lt;-</code> operator:</p>
<pre class="r"><code>rivers2 &lt;- new_rivers + 1
rivers2</code></pre>
<pre><code>## [1] 1056 137 267 248 892</code></pre>
<pre><code>## [1] 1102 382 527 385 272</code></pre>
<hr />
</div>
<div id="error-unexpected-in-error-unexpected-in-error-unexpected-x-in" class="section level2">
Expand Down
3 changes: 1 addition & 2 deletions modules/Factors/lab/Factors_Lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ <h1 class="title toc-ignore">Factors Lab</h1>


<p>Load all the libraries we will use in this lab.</p>
<pre class="r"><code>library(dplyr)
library(ggplot2)</code></pre>
<pre class="r"><code>library(tidyverse)</code></pre>
<div id="section" class="section level3">
<h3>1.0</h3>
<p>Load the Youth Tobacco Survey data from <a href="http://jhudatascience.org/intro_to_r/data/Youth_Tobacco_Survey_YTS_Data.csv" class="uri">http://jhudatascience.org/intro_to_r/data/Youth_Tobacco_Survey_YTS_Data.csv</a>. <code>select</code> “Sample_Size”, “Education”, and “LocationAbbr”. Name this data “yts”.</p>
Expand Down

0 comments on commit eaa32a6

Please sign in to comment.