-
Notifications
You must be signed in to change notification settings - Fork 1
/
04_join.qmd
47 lines (32 loc) · 938 Bytes
/
04_join.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
title: "join"
date-modified: 'today'
date-format: long
format:
html:
footer: "CC BY 4.0 John R Little"
license: CC BY
---
```{r}
library(tidyverse)
```
## Join
There are a series of [join commands](https://dplyr.tidyverse.org/reference/index.html#section-two-table-verbs)
- left_join, inner_join, right_join, full_join,
- semi_join, anti_join
![dplyr joins visualized](https://pbs.twimg.com/media/B6eUTTACUAAahLf.png)
## data
These exercises use the following [`dplyr` datasets](https://ggplot2.tidyverse.org/reference/index.html#section-data)
- dplyr::band_instruments
- dplyr::band_members
```{r}
band_members
band_instruments
```
## Goal
Make one big data frame that joins `band_members` with `band_instruments`. Using the template below you need to identify what type of join to use and identify the join key.
```{r}
#| eval: false
band_members |>
----_join(band_instruments, by = "----")
```