Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielodom committed Jan 3, 2024
1 parent 88307a0 commit 316c729
Show file tree
Hide file tree
Showing 4 changed files with 305 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
619fe22f
80dfce92
282 changes: 282 additions & 0 deletions _figures/dplyr_joins_venn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions lessons/lesson09_dplyr.html
Original file line number Diff line number Diff line change
Expand Up @@ -1575,13 +1575,15 @@ <h2 class="anchored" data-anchor-id="grouping-by-multiple-variables">Grouping by
<h1>Using <code>*_join()</code> to Merge Tibbles</h1>
<p>If you have two or more tables which share one or more columns, then you can join these tables using the <code>*_join()</code> family of functions. For two data tables <code>A</code> and <code>B</code> with a shared column named <code>"x"</code>, these functions are</p>
<ul>
<li><code>left_join(A, B, by = "x")</code>: join matching rows from <code>B</code> to <code>A</code>. Missing rows in <code>B</code> will be padded with <code>NA</code>.</li>
<li><code>right_join(A, B, by = "x")</code>: join matching rows from <code>A</code> to <code>B</code>. Missing rows in <code>A</code> will be padded with <code>NA</code>.</li>
<li><code>left_join(A, B, by = "x")</code>: join matching rows from <code>B</code> to <code>A</code>. Missing rows in <code>B</code> will be padded with <code>NA</code>. The resulting data set will have the same number of rows as <code>A</code>.</li>
<li><code>right_join(A, B, by = "x")</code>: join matching rows from <code>A</code> to <code>B</code>. Missing rows in <code>A</code> will be padded with <code>NA</code>. The resulting data set will have the same number of rows as <code>B</code>.</li>
<li><code>inner_join(A, B, by = "x")</code>: join rows only in both <code>A</code> and <code>B</code>. There will be no missing rows.</li>
<li><code>full_join(A, B, by = "x")</code>: join all rows in <code>A</code> and <code>B</code>. Missing rows in <code>A</code> and <code>B</code> will be padded with <code>NA</code>.</li>
<li><code>semi_join(A, B, by = "x")</code>: retain rows in <code>A</code> which have a match in <code>B</code>.</li>
<li><code>anti_join(A, B, by = "x")</code>: retain rows in <code>A</code> which do not have a match in <code>B</code>.</li>
</ul>
<p>There is a <a href="https://tavareshugo.github.io/r-intro-tidyverse-gapminder/08-joins">Data Carpentry lesson</a> on <code>dplyr::</code> joins that may be helpful to you, and I copied this Venn diagram from that lesson.</p>
<p><img src="../_figures/dplyr_joins_venn.svg" class="img-fluid"></p>
<section id="carrier-name-data" class="level2">
<h2 class="anchored" data-anchor-id="carrier-name-data">Carrier Name Data</h2>
<p>Take a look at the names of the airlines in the <code>flights</code> data set (the <code>unique()</code> function does what you think it does)</p>
Expand Down
36 changes: 18 additions & 18 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,74 +2,74 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/index.html</loc>
<lastmod>2024-01-01T16:21:04.719Z</lastmod>
<lastmod>2024-01-03T15:34:37.505Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/about.html</loc>
<lastmod>2024-01-01T16:21:05.107Z</lastmod>
<lastmod>2024-01-03T15:34:38.027Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson01_greater_data_science.html</loc>
<lastmod>2024-01-01T16:21:07.118Z</lastmod>
<lastmod>2024-01-03T15:34:40.506Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson10_stringr.html</loc>
<lastmod>2024-01-01T16:21:11.079Z</lastmod>
<lastmod>2024-01-03T15:34:45.629Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson07_lists_and_tibbles.html</loc>
<lastmod>2024-01-01T16:21:14.826Z</lastmod>
<lastmod>2024-01-03T15:34:50.632Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson06_atomic_vectors.html</loc>
<lastmod>2024-01-01T16:21:17.415Z</lastmod>
<lastmod>2024-01-03T15:34:53.957Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson04s_examples.html</loc>
<lastmod>2024-01-01T16:21:30.156Z</lastmod>
<lastmod>2024-01-03T15:35:10.541Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson11_functions.html</loc>
<lastmod>2024-01-01T16:21:32.259Z</lastmod>
<lastmod>2024-01-03T15:35:13.274Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson09s_dplyr_v_base.html</loc>
<lastmod>2024-01-01T16:21:35.680Z</lastmod>
<lastmod>2024-01-03T15:35:17.787Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson04_ggplot.html</loc>
<lastmod>2024-01-01T16:21:44.226Z</lastmod>
<lastmod>2024-01-03T15:35:28.711Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson12_purrr.html</loc>
<lastmod>2024-01-01T16:21:50.212Z</lastmod>
<lastmod>2024-01-03T15:35:35.254Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson05_RStudio_projects.html</loc>
<lastmod>2024-01-01T16:21:52.300Z</lastmod>
<lastmod>2024-01-03T15:35:37.803Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson02s_scripts.html</loc>
<lastmod>2024-01-01T16:21:53.418Z</lastmod>
<lastmod>2024-01-03T15:35:39.256Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson08_Data_Read_Write.html</loc>
<lastmod>2024-01-01T16:21:57.296Z</lastmod>
<lastmod>2024-01-03T15:35:43.952Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson13_eda_w_tidyverse.html</loc>
<lastmod>2024-01-01T16:22:04.347Z</lastmod>
<lastmod>2024-01-03T15:35:51.889Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson02_introduction_to_R.html</loc>
<lastmod>2024-01-01T16:22:06.356Z</lastmod>
<lastmod>2024-01-03T15:35:54.467Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson03_introduction_to_Quarto.html</loc>
<lastmod>2024-01-01T16:22:06.907Z</lastmod>
<lastmod>2024-01-03T15:35:55.156Z</lastmod>
</url>
<url>
<loc>https://gabrielodom.github.io/PHC6701_r4ds/lessons/lesson09_dplyr.html</loc>
<lastmod>2024-01-01T16:22:18.949Z</lastmod>
<lastmod>2024-01-03T15:36:09.833Z</lastmod>
</url>
</urlset>

0 comments on commit 316c729

Please sign in to comment.