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 Mar 20, 2024
1 parent 6753f62 commit 5eb407c
Show file tree
Hide file tree
Showing 15 changed files with 2,272 additions and 396 deletions.
8 changes: 4 additions & 4 deletions help.html
Original file line number Diff line number Diff line change
Expand Up @@ -405,16 +405,16 @@ <h2><strong>Why are my changes not taking effect? It’s making my results
<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] 900 890 780 430 250</code></pre>
<pre><code>## [1] 350 2533 246 270 360</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] 901 891 781 431 251</code></pre>
<pre><code>## [1] 351 2534 247 271 361</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] 901 891 781 431 251</code></pre>
<pre><code>## [1] 351 2534 247 271 361</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>
Expand Down Expand Up @@ -484,7 +484,7 @@ <h2><strong>Error: object ‘X’ not found</strong></h2>
operator:</p>
<pre class="r"><code>rivers2 &lt;- new_rivers + 1
rivers2</code></pre>
<pre><code>## [1] 902 892 782 432 252</code></pre>
<pre><code>## [1] 352 2535 248 272 362</code></pre>
<hr />
</div>
<div id="error-unexpected-in-error-unexpected-in-error-unexpected-x-in"
Expand Down
16 changes: 8 additions & 8 deletions modules/Data_Classes/lab/Data_Classes_Lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ <h1>Part 1</h1>
<pre class="r"><code>library(readr)
library(tidyverse)</code></pre>
<pre><code>## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.2 ✔ purrr 1.0.1
## ✔ forcats 1.0.0 ✔ stringr 1.5.0
## ✔ ggplot2 3.4.2 ✔ tibble 3.2.1
## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0
## ✔ dplyr 1.1.4 ✔ purrr 1.0.2
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.0 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
Expand Down Expand Up @@ -391,10 +391,6 @@ <h1>Part 1</h1>
<p>6. Read in the Charm City Circulator data using
<code>read_circulator()</code> function from <code>jhur</code> package
using the code supplied in the chunk.</p>
<ul>
<li>Use the <code>str()</code> function to take a look at the data and
learn about the column types.</li>
</ul>
<pre class="r"><code>circ &lt;- read_circulator()</code></pre>
<pre><code>## Rows: 1146 Columns: 15
## ── Column specification ────────────────────────────────────────────────────────
Expand All @@ -404,6 +400,10 @@ <h1>Part 1</h1>
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.</code></pre>
<ul>
<li>Use the <code>str()</code> function to take a look at the data and
learn about the column types.</li>
</ul>
<p>7. Use the <code>mutate()</code> function to create a new column
named <code>date_formatted</code> that is of <code>Date</code> class.
The new variable is created from <code>date</code> column. Hint: use
Expand Down
25 changes: 9 additions & 16 deletions modules/Data_Cleaning/lab/Data_Cleaning_Lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@



<title>Data Cleaning Lab Key</title>
<title>Data Cleaning Lab</title>

<script>// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
Expand Down Expand Up @@ -348,7 +348,7 @@



<h1 class="title toc-ignore">Data Cleaning Lab Key</h1>
<h1 class="title toc-ignore">Data Cleaning Lab</h1>

</div>

Expand All @@ -360,17 +360,8 @@ <h1>Data used</h1>
<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>
<pre class="r"><code>library(readr)
library(tidyverse)</code></pre>
<pre><code>## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.2 ✔ purrr 1.0.1
## ✔ forcats 1.0.0 ✔ stringr 1.5.0
## ✔ ggplot2 3.4.2 ✔ tibble 3.2.1
## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (&lt;http://conflicted.r-lib.org/&gt;) to force all conflicts to become errors</code></pre>
<pre class="r"><code>library(dplyr)
library(tidyverse)
library(dplyr)
library(lubridate)
library(jhur)
library(tidyverse)
Expand Down Expand Up @@ -452,7 +443,7 @@ <h1>Part 2</h1>
<ol style="list-style-type: decimal">
<li><p>Determine how many <code>NA</code> values there are for
<code>weight_loss</code> (assume you know that<code>N</code> and
<code>n</code> is for no). .</p></li>
<code>n</code> is for no).</p></li>
<li><p>Recode the <code>weight_loss</code> variable of the
<code>BloodType</code> data so that it is consistent. Use
<code>case_when()</code>. Keep “Other” as “Other”. Don’t forget to use
Expand Down Expand Up @@ -482,8 +473,10 @@ <h1>Part 2</h1>
shown below (don’t want backticks).</p></li>
</ol>
<pre><code># General format
NEW_TIBBLE &lt;- OLD_TIBBLE %&gt;%
separate(OLD_COLUMN, into = c(&quot;NEW_COLUMN1&quot;, &quot;NEW_COLUMN2&quot;), sep = &quot;SEPARATING_CHARACTER&quot;)</code></pre>
NEW_TIBBLE &lt;- OLD_TIBBLE %&gt;%
separate(OLD_COLUMN,
into = c(&quot;NEW_COLUMN1&quot;, &quot;NEW_COLUMN2&quot;),
sep = &quot;SEPARATING_CHARACTER&quot;)</code></pre>
<p><strong>Bonus / Extra practice</strong>: How many observations are
there for each <code>Rhfactor</code> in the data object you just
made:</p>
Expand Down
2 changes: 1 addition & 1 deletion modules/Data_Input/lab/Data_Input_Lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ <h3>P.4</h3>
file there.</p>
<p>Modify the following code so that it finds “asthma.xlsx” in the
“data” directory.</p>
<pre class="r"><code>asthma &lt;- read_excel(path = &quot;asthma.xlsx&quot;)</code></pre>
<pre><code>asthma &lt;- read_excel(path = &quot;asthma.xlsx&quot;)</code></pre>
</div>
<div id="p.5" class="section level3">
<h3>P.5</h3>
Expand Down
347 changes: 271 additions & 76 deletions modules/Data_Output/lab/Data_Output_Lab.html

Large diffs are not rendered by default.

13 changes: 0 additions & 13 deletions modules/Data_Summarization/lab/Data_Summarization_Lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -450,19 +450,6 @@ <h1>Part 2</h1>
column “mean”.</li>
</ul>
</div>
<div id="part-3" class="section level1">
<h1>Part 3</h1>
<p>9. Create a histogram for the <code>length</code> column in the
<code>bike</code> dataset. Try playing with the <code>breaks =</code>
argument.</p>
<p>10. Create a scatterplot of the <code>bike</code> dataset with
<code>dateInstalled</code> on the x axis and <code>length</code> on the
y axis.</p>
<p><strong>Bonus / Extra practice</strong>:</p>
<p>F. What kind of plot would be better for showing the length by each
year group from <code>bike</code>? Make this plot. Also try this with
the <code>bike_2</code> object above.</p>
</div>



Expand Down
25 changes: 10 additions & 15 deletions modules/Data_Visualization/lab/Data_Visualization_Lab.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

371 changes: 289 additions & 82 deletions modules/Factors/lab/Factors_Lab.html

Large diffs are not rendered by default.

539 changes: 539 additions & 0 deletions modules/HW/homework2.html

Large diffs are not rendered by default.

544 changes: 544 additions & 0 deletions modules/HW/homework3.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@



<title>Manipulating Data in R Lab - Key</title>
<title>Manipulating Data in R Lab</title>

<script>// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
Expand Down Expand Up @@ -348,7 +348,7 @@



<h1 class="title toc-ignore">Manipulating Data in R Lab - Key</h1>
<h1 class="title toc-ignore">Manipulating Data in R Lab</h1>

</div>

Expand Down
18 changes: 17 additions & 1 deletion modules/RStudio/lab/RStudio_Lab.html

Large diffs are not rendered by default.

391 changes: 308 additions & 83 deletions modules/Statistics/lab/Statistics_Lab.html

Large diffs are not rendered by default.

22 changes: 3 additions & 19 deletions modules/Subsetting_Data_in_R/lab/Subsetting_Data_in_R_Lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@



<title>Subsetting Data in R - Lab</title>
<title>Subsetting Data in R</title>

<script>// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
Expand Down Expand Up @@ -348,7 +348,7 @@



<h1 class="title toc-ignore">Subsetting Data in R - Lab</h1>
<h1 class="title toc-ignore">Subsetting Data in R</h1>

</div>

Expand Down Expand Up @@ -387,22 +387,6 @@ <h1>Part 1</h1>
<p><strong>Bonus / Extra practice</strong>: How can you print the first
3 rows and the last 3 rows of <code>county_pop</code> (in two lines of
code)?</p>
<pre class="r"><code>head(county_pop, 3)</code></pre>
<pre><code>## # A tibble: 3 × 10
## BUYER_COUNTY BUYER_STATE countyfips STATE COUNTY county_name NAME variable
## &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;int&gt; &lt;int&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt;
## 1 AUTAUGA AL 01001 1 1 Autauga Autauga… B01003_…
## 2 BALDWIN AL 01003 1 3 Baldwin Baldwin… B01003_…
## 3 BARBOUR AL 01005 1 5 Barbour Barbour… B01003_…
## # ℹ 2 more variables: year &lt;int&gt;, population &lt;int&gt;</code></pre>
<pre class="r"><code>tail(county_pop, 3)</code></pre>
<pre><code>## # A tibble: 3 × 10
## BUYER_COUNTY BUYER_STATE countyfips STATE COUNTY county_name NAME variable
## &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;int&gt; &lt;int&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt;
## 1 SKAGWAY AK 02230 2 230 Skagway Skag… B01003_…
## 2 HOONAH ANGOON AK 02105 2 105 Hoonah Angoon Hoon… B01003_…
## 3 PETERSBURG AK 02195 2 195 Petersburg Pete… B01003_…
## # ℹ 2 more variables: year &lt;int&gt;, population &lt;int&gt;</code></pre>
</div>
<div id="part-2" class="section level1">
<h1>Part 2</h1>
Expand Down Expand Up @@ -443,7 +427,7 @@ <h1>Part 2</h1>
<div id="part-3" class="section level1">
<h1>Part 3</h1>
<ol style="list-style-type: decimal">
<li><p>Create a subset called <code>county_2012</code>from
<li><p>Create a subset called <code>county_2012</code> from
<code>county_pop</code> that only contains the rows for the year 2012
and only the columns: <code>county_name</code>, <code>state_name</code>,
<code>population</code>. <code>year</code> should not be included in
Expand Down

0 comments on commit 5eb407c

Please sign in to comment.