From f0b19065c74b2d6205f5c86e4d32b9c637cb9be1 Mon Sep 17 00:00:00 2001 From: Jonathan Kitt Date: Tue, 29 Nov 2022 14:46:36 +0100 Subject: [PATCH] Update joins.qmd (#1161) --- joins.qmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/joins.qmd b/joins.qmd index 0a3b035..509b949 100644 --- a/joins.qmd +++ b/joins.qmd @@ -724,7 +724,7 @@ x |> left_join(y, by = "key", keep = TRUE) ```{r} #| label: fig-inner-both #| fig-cap: > -#| An left join showing both `x` and `y` keys in the output. +#| A left join showing both `x` and `y` keys in the output. #| fig-alt: > #| A join diagram showing an inner join betwen x and y. The result #| now includes four columns: key.x, val_x, key.y, and val_y. The @@ -736,7 +736,7 @@ x |> left_join(y, by = "key", keep = TRUE) knitr::include_graphics("diagrams/join/inner-both.png", dpi = 270) ``` -When we move away from equi-joins we'll always show the keys, because the key values will often different. +When we move away from equi-joins we'll always show the keys, because the key values will often be different. For example, instead of matching only when the `x$key` and `y$key` are equal, we could match whenever the `x$key` is greater than or equal to the `y$key`, leading to @fig-join-gte. dplyr's join functions understand this distinction equi and non-equi joins so will always show both keys when you perform a non-equi join.