left_join.dtplyr_step {dtplyr} | R Documentation |
These are methods for the dplyr generics left_join()
, right_join()
,
inner_join()
, full_join()
, anti_join()
, and semi_join()
. The
mutating joins (left, right, inner, and full) are translated to
data.table::merge.data.table()
, except for the special cases where it's
possible to translate to [.data.table
. Semi- and anti-joins have no
direct data.table equivalent.
## S3 method for class 'dtplyr_step' left_join(x, y, ..., by = NULL, copy = FALSE, suffix = c(".x", ".y"))
x, y |
A pair of |
... |
Other parameters passed onto methods. |
by |
A character vector of variables to join by. If To join by different variables on To join by multiple variables, use a vector with length > 1.
For example, To perform a cross-join, generating all combinations of |
copy |
If |
suffix |
If there are non-joined duplicate variables in |
library(dplyr, warn.conflicts = FALSE) band_dt <- lazy_dt(dplyr::band_members) instrument_dt <- lazy_dt(dplyr::band_instruments) band_dt %>% left_join(instrument_dt) band_dt %>% right_join(instrument_dt) band_dt %>% inner_join(instrument_dt) band_dt %>% full_join(instrument_dt) band_dt %>% semi_join(instrument_dt) band_dt %>% anti_join(instrument_dt)