Join two data.frames together
inner_join(x, y, by = NULL, suffix = c(".x", ".y"))left_join(x, y, by = NULL, suffix = c(".x", ".y"))
right_join(x, y, by = NULL, suffix = c(".x", ".y"))
full_join(x, y, by = NULL, suffix = c(".x", ".y"))
The data.frame
s to join.
A character vector of variables to join by. If NULL
, the default,
*_join()
will do a natural join, using all variables with common names
across the two tables. A message lists the variables so that you can check
they're right (to suppress the message, simply explicitly list the variables
that you want to join).
To join by different variables on x and y use a named vector. For example,
by = c("a" = "b")
will match x.a
to y.b
.
If there are non-joined duplicate variables in x
and y
,
these suffixes will be added to the output to disambiguate them. Should be a
character vector of length 2.