Description Usage Arguments Details
Wrappers around dplyr's joining function that allow to check a variety of
things on the fly and either inform
, warn
or abort
as a result.
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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | safe_left_join(
x,
y,
by = NULL,
copy = FALSE,
suffix = c(".x", ".y"),
na_matches = c("na", "never"),
match_fun = NULL,
check = "~blC",
conflict = NULL
)
safe_right_join(
x,
y,
by = NULL,
copy = FALSE,
suffix = c(".x", ".y"),
na_matches = c("na", "never"),
match_fun = NULL,
check = "~blC",
conflict = NULL
)
safe_inner_join(
x,
y,
by = NULL,
copy = FALSE,
suffix = c(".x", ".y"),
na_matches = c("na", "never"),
match_fun = NULL,
check = "~blC",
conflict = NULL
)
safe_full_join(
x,
y,
by = NULL,
copy = FALSE,
suffix = c(".x", ".y"),
na_matches = c("na", "never"),
match_fun = NULL,
check = "~blC",
conflict = NULL
)
safe_semi_join(
x,
y,
by = NULL,
copy = FALSE,
na_matches = c("na", "never"),
match_fun = NULL,
check = "~blC",
conflict = NULL
)
safe_anti_join(
x,
y,
by = NULL,
copy = FALSE,
na_matches = c("na", "never"),
match_fun = NULL,
check = "~blC",
conflict = NULL
)
safe_nest_join(
x,
y,
by = NULL,
copy = FALSE,
keep = FALSE,
name = NULL,
match_fun = NULL,
check = "~blC",
conflict = NULL
)
|
x, y |
tbls to join |
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 |
na_matches |
Should The default, Use |
match_fun |
Vectorized function
given two columns, returning |
check |
a string, see details |
conflict |
if |
keep |
Should the join keys from both |
name |
The name of the list column nesting joins create.
If |
check
is a combination of characters which will trigger different checks:
as in by, check that by
was given explicitly. Default behavior
in dplyr is to trigger a message
as in column conflict, check if, among non join
columns, some column names are found in both x
and y
. Default behavior
in dplyr's joining functions is to suffix them silently.
as in unique, check if no set of values of join columns
is duplicated in x
the letter after u, check if no set of values of join columns
is duplicated in y
as in match, check if all sets of values of join columns in
x
wil be matched in y
the letter after m, check if all sets of values of join columns in
y
wil be matched in x
as in expanded, check that all combinations of values of
join columns are present in x
the letter after e, check that all combinations of values of
join columns are present in y
as in levels, check that join columns are consistent in term of factor levels
as in type, check that joining columns have same class and type
An upper case letter will trigger abort
, a lower case letter will trigger
warn
, a lower case letter prefixed with ~
will trigger a message. Other
characters will be ignored.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.