Skip to content

Commit 3eee871

Browse files
Render site
1 parent d27728b commit 3eee871

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

help.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,14 @@ <h2><strong>Why are my changes not taking effect? It’s making my results look
347347
<p>Here we are creating a new object from an existing one:</p>
348348
<pre class="r"><code>new_rivers &lt;- sample(rivers, 5)
349349
new_rivers</code></pre>
350-
<pre><code>## [1] 470 291 906 411 850</code></pre>
350+
<pre><code>## [1] 3710 500 329 291 505</code></pre>
351351
<p>Using just this will only print the result and not actually change <code>new_rivers</code>:</p>
352352
<pre class="r"><code>new_rivers + 1</code></pre>
353-
<pre><code>## [1] 471 292 907 412 851</code></pre>
353+
<pre><code>## [1] 3711 501 330 292 506</code></pre>
354354
<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>
355355
<pre class="r"><code>new_rivers &lt;- new_rivers + 1
356356
new_rivers</code></pre>
357-
<pre><code>## [1] 471 292 907 412 851</code></pre>
357+
<pre><code>## [1] 3711 501 330 292 506</code></pre>
358358
<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>
359359
<hr />
360360
</div>
@@ -403,7 +403,7 @@ <h2><strong>Error: object ‘X’ not found</strong></h2>
403403
<p>Make sure you run something like this, with the <code>&lt;-</code> operator:</p>
404404
<pre class="r"><code>rivers2 &lt;- new_rivers + 1
405405
rivers2</code></pre>
406-
<pre><code>## [1] 472 293 908 413 852</code></pre>
406+
<pre><code>## [1] 3712 502 331 293 507</code></pre>
407407
<hr />
408408
</div>
409409
<div id="error-unexpected-in-error-unexpected-in-error-unexpected-x-in" class="section level2">

modules/Data_Cleaning/lab/Data_Cleaning_Lab.html

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,18 @@ <h1>Part 1</h1>
170170
<p><strong>Data used</strong></p>
171171
<p>Bike Lanes Dataset: BikeBaltimore is the Department of Transportation’s bike program. The data is from <a href="http://data.baltimorecity.gov/Transportation/Bike-Lanes/xzfj-gyms" class="uri">http://data.baltimorecity.gov/Transportation/Bike-Lanes/xzfj-gyms</a></p>
172172
<p>You can Download as a CSV in your current working directory. Note its also available at: <a href="http://jhudatascience.org/intro_to_r/data/Bike_Lanes.csv" class="uri">http://jhudatascience.org/intro_to_r/data/Bike_Lanes.csv</a></p>
173-
<pre class="r"><code>library(tidyverse)
174-
# install.packages(&quot;naniar&quot;)
173+
<pre class="r"><code>library(tidyverse)</code></pre>
174+
<pre><code>## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
175+
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
176+
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
177+
## ✔ ggplot2 3.5.2 ✔ tibble 3.2.1
178+
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
179+
## ✔ purrr 1.0.4
180+
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
181+
## ✖ dplyr::filter() masks stats::filter()
182+
## ✖ dplyr::lag() masks stats::lag()
183+
## ℹ Use the conflicted package (&lt;http://conflicted.r-lib.org/&gt;) to force all conflicts to become errors</code></pre>
184+
<pre class="r"><code># install.packages(&quot;naniar&quot;)
175185
library(naniar)</code></pre>
176186
<p>Read in the bike data, you can use the URL or download the data and save the data as an object called <code>bike</code>.</p>
177187
<p>Bike Lanes Dataset: BikeBaltimore is the Department of Transportation’s bike program. The data is from <a href="http://data.baltimorecity.gov/Transportation/Bike-Lanes/xzfj-gyms" class="uri">http://data.baltimorecity.gov/Transportation/Bike-Lanes/xzfj-gyms</a></p>
@@ -261,7 +271,7 @@ <h3>2.2</h3>
261271
mutate(NEW_COLUMN = case_when(
262272
OLD_COLUMN %in% c( ... ) ~ ... ,
263273
OLD_COLUMN %in% c( ... ) ~ ... ,
264-
TRUE ~ OLD_COLUMN
274+
.default = OLD_COLUMN
265275
))</code></pre>
266276
</div>
267277
<div id="section-5" class="section level3">

0 commit comments

Comments
 (0)