Description Usage Arguments Examples
See join
for a description of the general purpose of the
functions.
1 2 3 4 5 6 7 8 9 10 11 |
x,y |
tbls to join |
by |
a character vector of variables to join by. If To join by different variables on x and y use a named vector.
For example, |
copy |
If |
... |
Included for compatibility with generic; otherwise ignored. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | if (require(Lahman)){
data("Batting", package = "Lahman")
data("Master", package = "Lahman")
batting_ffdf <- tbl_ffdf(Batting)
person_ffdf <- tbl_ffdf(Master)
# Inner join: match batting and person data
inner_join(batting_ffdf, person_ffdf)
# Left join: keep batting data even if person missing
left_join(batting_ffdf, person_ffdf)
# Semi-join: find batting data for top 4 teams, 2010:2012
grid <- expand.grid(
teamID = c("WAS", "ATL", "PHI", "NYA"),
yearID = 2010:2012)
top4 <- semi_join(batting_ffdf, grid, copy = TRUE)
# Anti-join: find batting data with out player data
anti_join(batting_ffdf, person_ffdf)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.