You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***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.
10
16
***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.
Copy file name to clipboardExpand all lines: docs/presentations/day_07.html
+11-12Lines changed: 11 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -454,8 +454,12 @@
454
454
<h1class="title">Joining / Merging Data</h1>
455
455
</section>
456
456
457
-
<section><sectionid="relational-data-and-r" class="title-slide slide level1"><h1>Relational Data and R</h1></section><sectionid="defining-terms" class="slide level2">
<liclass="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>
461
465
<liclass="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>
467
471
<liclass="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>
468
472
<liclass="fragment"><strong>Set operations</strong>: treat observations as if they were set elements</li>
<section><sectionid="compare-with-other-functions" class="title-slide slide level1"><h1>Compare with other functions</h1></section><sectionid="merge" class="slide level2">
510
+
<h2><code>merge()</code></h2>
512
511
<p><code>base::merge()</code> can perform all four types of joins:</p>
<liclass="fragment">specific dplyr verbs more clearly convey the intent of your code: they are concealed in the arguments of <spanclass="bullet_code">merge()</span>.</li>
541
540
<liclass="fragment">dplyr’s joins are considerably faster and don’t mess with the order of the rows.</li>
***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.
10
16
***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.
0 commit comments