From c8c54c29ffd61bdd42e656a23fcbe487c922ddd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mine=20=C3=87etinkaya-Rundel?= Date: Wed, 8 Nov 2023 22:33:13 -0500 Subject: [PATCH] Use join_by() --- joins.qmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/joins.qmd b/joins.qmd index 25d0167..b18759b 100644 --- a/joins.qmd +++ b/joins.qmd @@ -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()`?