Skip to content

Commit ecfd865

Browse files
author
Adam M. Wilson
committed
update tasklist
1 parent e78f427 commit ecfd865

File tree

6 files changed

+36
-39
lines changed

6 files changed

+36
-39
lines changed

Tasklist.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ output:
66
toc_depth: 1
77
---
88

9-
2```{r, echo=FALSE, message=FALSE, results='hide', purl=FALSE}
9+
```{r, echo=FALSE, message=FALSE, results='hide', purl=FALSE}
1010
library(dplyr)
1111
source("functions.R")
1212
yamls=yaml_dir()

Tasklist.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ output:
66
toc_depth: 1
77
---
88

9-
2```{r, echo=FALSE, message=FALSE, results='hide', purl=FALSE}
10-
library(dplyr)
11-
source("functions.R")
12-
yamls=yaml_dir()
13-
yamls=yamls[order(sapply(yamls,function(x) x$date))]
14-
```
9+
1510

1611
Below are a set of tasks that we will work on in class (either alone or in small groups).
1712

docs/Tasklist.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,6 @@ <h1 class="title toc-ignore">Tasklist</h1>
474474
</div>
475475

476476

477-
<p>2<code>{r, echo=FALSE, message=FALSE, results='hide', purl=FALSE} library(dplyr) source(&quot;functions.R&quot;) yamls=yaml_dir() yamls=yamls[order(sapply(yamls,function(x) x$date))]</code></p>
478477
<p>Below are a set of tasks that we will work on in class (either alone or in small groups).</p>
479478
<hr />
480479
<div id="cs_01-create-a-simple-functioning-script" class="section level1">

docs/presentations/day_07.Rmd

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ title: "Joining / Merging Data"
44

55
# Relational Data
66

7-
## Defining Terms
7+
## Relational Data
8+
9+
![](http://r4ds.had.co.nz/diagrams/relational-nycflights.png)
10+
11+
## Visualizing Relational Data
12+
13+
![](http://r4ds.had.co.nz/diagrams/join-setup.png)
814

915
* **Primary key**: uniquely identifies an observation in its own table. For example, `planes$tailnum` is a primary key because it uniquely identifies each plane in the planes table.
1016
* **Foreign key**: uniquely identifies an observation in another table. For example, the `flights$tailnum` is a foreign key because it appears in the flights table where it matches each flight to a unique plane.
@@ -15,13 +21,7 @@ title: "Joining / Merging Data"
1521
* **Filtering joins**: filter observations from one data frame based on whether or not they match an observation in the other table.
1622
* **Set operations**: treat observations as if they were set elements
1723

18-
## Relational Data
19-
20-
![](http://r4ds.had.co.nz/diagrams/relational-nycflights.png)
2124

22-
## Visualizing Relational Data
23-
24-
![](http://r4ds.had.co.nz/diagrams/join-setup.png)
2525

2626
## Inner Join
2727
![](http://r4ds.had.co.nz/diagrams/join-inner.png)
@@ -62,7 +62,9 @@ Matches pairs of observations whenever their keys are equal:
6262

6363
Anti-joins are useful for diagnosing join mismatches.
6464

65-
## Other Cases (`merge()`)
65+
# Compare with other functions
66+
67+
## `merge()`
6668

6769
`base::merge()` can perform all four types of joins:
6870

@@ -76,7 +78,7 @@ dplyr | merge
7678
* specific dplyr verbs more clearly convey the intent of your code: they are concealed in the arguments of <span class="bullet_code">merge()</span>.
7779
* dplyr's joins are considerably faster and don't mess with the order of the rows.
7880

79-
## Other Cases (SQL)
81+
## SQL
8082

8183
SQL is the inspiration for dplyr's conventions, so the translation is straightforward:
8284

docs/presentations/day_07.html

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,12 @@
454454
<h1 class="title">Joining / Merging Data</h1>
455455
</section>
456456

457-
<section><section id="relational-data-and-r" class="title-slide slide level1"><h1>Relational Data and R</h1></section><section id="defining-terms" class="slide level2">
458-
<h2>Defining Terms</h2>
457+
<section><section id="relational-data" class="title-slide slide level1"><h1>Relational Data</h1></section><section id="relational-data-1" class="slide level2">
458+
<h2>Relational Data</h2>
459+
<p><img data-src="http://r4ds.had.co.nz/diagrams/relational-nycflights.png" /></p>
460+
</section><section id="visualizing-relational-data" class="slide level2">
461+
<h2>Visualizing Relational Data</h2>
462+
<p><img data-src="http://r4ds.had.co.nz/diagrams/join-setup.png" /></p>
459463
<ul>
460464
<li class="fragment"><strong>Primary key</strong>: uniquely identifies an observation in its own table. For example, <code>planes$tailnum</code> is a primary key because it uniquely identifies each plane in the planes table.</li>
461465
<li class="fragment"><strong>Foreign key</strong>: uniquely identifies an observation in another table. For example, the <code>flights$tailnum</code> is a foreign key because it appears in the flights table where it matches each flight to a unique plane.</li>
@@ -467,12 +471,6 @@ <h2>3 families of verbs designed to work with relational data</h2>
467471
<li class="fragment"><strong>Filtering joins</strong>: filter observations from one data frame based on whether or not they match an observation in the other table.</li>
468472
<li class="fragment"><strong>Set operations</strong>: treat observations as if they were set elements</li>
469473
</ul>
470-
</section><section id="relational-data" class="slide level2">
471-
<h2>Relational Data</h2>
472-
<p><img data-src="http://r4ds.had.co.nz/diagrams/relational-nycflights.png" /></p>
473-
</section><section id="visualizing-relational-data" class="slide level2">
474-
<h2>Visualizing Relational Data</h2>
475-
<p><img data-src="http://r4ds.had.co.nz/diagrams/join-setup.png" /></p>
476474
</section><section id="inner-join" class="slide level2">
477475
<h2>Inner Join</h2>
478476
<p><img data-src="http://r4ds.had.co.nz/diagrams/join-inner.png" /></p>
@@ -507,8 +505,9 @@ <h3 id="semi_joinx-y-keeps-all-observations-in-x-that-have-a-match-in-y."><code>
507505
<h2><code>anti_join(x, y)</code> drops all observations in x that have a match in y.</h2>
508506
<p><img data-src="http://r4ds.had.co.nz/diagrams/join-anti.png" /></p>
509507
<p>Anti-joins are useful for diagnosing join mismatches.</p>
510-
</section><section id="other-cases-merge" class="slide level2">
511-
<h2>Other Cases (<code>merge()</code>)</h2>
508+
</section></section>
509+
<section><section id="compare-with-other-functions" class="title-slide slide level1"><h1>Compare with other functions</h1></section><section id="merge" class="slide level2">
510+
<h2><code>merge()</code></h2>
512511
<p><code>base::merge()</code> can perform all four types of joins:</p>
513512
<table>
514513
<thead>
@@ -540,8 +539,8 @@ <h2>Other Cases (<code>merge()</code>)</h2>
540539
<li class="fragment">specific dplyr verbs more clearly convey the intent of your code: they are concealed in the arguments of <span class="bullet_code">merge()</span>.</li>
541540
<li class="fragment">dplyr’s joins are considerably faster and don’t mess with the order of the rows.</li>
542541
</ul>
543-
</section><section id="other-cases-sql" class="slide level2">
544-
<h2>Other Cases (SQL)</h2>
542+
</section><section id="sql" class="slide level2">
543+
<h2>SQL</h2>
545544
<p>SQL is the inspiration for dplyr’s conventions, so the translation is straightforward:</p>
546545
<table>
547546
<thead>

docs/presentations/day_07.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
title: "Joining / Merging Data"
33
---
44

5-
# Relational Data and R
5+
# Relational Data
66

7-
## Defining Terms
7+
## Relational Data
8+
9+
![](http://r4ds.had.co.nz/diagrams/relational-nycflights.png)
10+
11+
## Visualizing Relational Data
12+
13+
![](http://r4ds.had.co.nz/diagrams/join-setup.png)
814

915
* **Primary key**: uniquely identifies an observation in its own table. For example, `planes$tailnum` is a primary key because it uniquely identifies each plane in the planes table.
1016
* **Foreign key**: uniquely identifies an observation in another table. For example, the `flights$tailnum` is a foreign key because it appears in the flights table where it matches each flight to a unique plane.
@@ -15,13 +21,7 @@ title: "Joining / Merging Data"
1521
* **Filtering joins**: filter observations from one data frame based on whether or not they match an observation in the other table.
1622
* **Set operations**: treat observations as if they were set elements
1723

18-
## Relational Data
19-
20-
![](http://r4ds.had.co.nz/diagrams/relational-nycflights.png)
2124

22-
## Visualizing Relational Data
23-
24-
![](http://r4ds.had.co.nz/diagrams/join-setup.png)
2525

2626
## Inner Join
2727
![](http://r4ds.had.co.nz/diagrams/join-inner.png)
@@ -62,7 +62,9 @@ Matches pairs of observations whenever their keys are equal:
6262

6363
Anti-joins are useful for diagnosing join mismatches.
6464

65-
## Other Cases (`merge()`)
65+
# Compare with other functions
66+
67+
## `merge()`
6668

6769
`base::merge()` can perform all four types of joins:
6870

@@ -76,7 +78,7 @@ dplyr | merge
7678
* specific dplyr verbs more clearly convey the intent of your code: they are concealed in the arguments of <span class="bullet_code">merge()</span>.
7779
* dplyr's joins are considerably faster and don't mess with the order of the rows.
7880

79-
## Other Cases (SQL)
81+
## SQL
8082

8183
SQL is the inspiration for dplyr's conventions, so the translation is straightforward:
8284

0 commit comments

Comments
 (0)