Functions :
- Safe versions of all dplyr and fuzzyjoin join functions
eatfunction as an improved join to grow data frames
Different types of checks to be use in check argument through the following
codes :
"c"to check conflicts of columns"b"like "by" checks ifbyparameter was given explicitly"u"like unique to check that the join columns form an unique key onx"v"to check that the join columns form an unique key ony"m"like match to check that all rows ofxhave a match"n"to check that all rows ofyhave a match"e"like expand to check that all combinations of joining columns are present inx"f"to check that all combinations of joining columns are present iny"l"like levels to check that join columns are consistent in term of factor levels"t"like type to check that joining columns have same class and type
Solve conflict between columns by applying a function on pairs of conflicted
columns through the conflict argument :
- regular functions like
coalesceortibble(to nest) - the special value
"patch"to keep values from rhs only when it matches
Features of eat
- It uses the
...argument to select columns from.yand leverages the select helpers from dplyr, allowing also things like renaming, negative selection, quasi-quotation... - It can prefix new columns or rename them in a flexible way
- It can aggregate the rhs on the join columns through the argument
.aggbefore joining - It can join recursively to a list of tables
- It can
.fillNAvalues from the rhs with a given value
Fuzzy joins special features:
match_funsupports formula notation- A simpler syntax renders obsolete the pair of
multi_byandmulti_match_funfrom the fuzzyjoin package, thebyargument should use a formula such as~ X("var1") > Y("var2") & X("var3") < Y("var4"), it can either return a logical vector or a data.frame containing a logical first column and other columns that will be added to the result