Use join_by()

This commit is contained in:
Mine Çetinkaya-Rundel 2023-11-08 22:33:13 -05:00
parent d5b151c360
commit c8c54c29ff
1 changed files with 3 additions and 3 deletions

View File

@ -401,7 +401,7 @@ flights2 |>
group_by(dest) |>
summarize(delay = mean(arr_delay), n = n()) |>
filter(n > 5) |>
inner_join(airports, by = c("dest" = "faa")) |>
inner_join(airports, join_by(dest == faa)) |>
ggplot(aes(x = lon, y = lat)) +
borders("state") +
geom_point(aes(size = n, color = delay)) +
@ -892,9 +892,9 @@ employees |>
Why are they different?
```{r}
x |> full_join(y, by = "key")
x |> full_join(y, join_by(key == key))
x |> full_join(y, by = "key", keep = TRUE)
x |> full_join(y, join_by(key == key), keep = TRUE)
```
2. When finding if any party period overlapped with another party period we used `q < q` in the `join_by()`?