|
|
hace 7 años | |
|---|---|---|
| R | hace 7 años | |
| images | hace 7 años | |
| .gitignore | hace 7 años | |
| README.Rmd | hace 7 años | |
| README.md | hace 7 años | |
| animated-inner-join.gif | hace 7 años | |
| install.R | hace 7 años | |
| runtime.txt | hace 7 años | |
| tidy-animated-verbs.Rproj | hace 7 años | |
Garrick Aden-Buie – @grrrck – garrickadenbuie.com
Mutate Joins: inner_join(), left_join(), right_join(), full_join()
Filtering Joins: semi_join(), anti_join()
Learn more about

x
#> # A tibble: 3 x 2
#> id x
#> <int> <chr>
#> 1 1 x1
#> 2 2 x2
#> 3 3 x3
y
#> # A tibble: 3 x 2
#> id y
#> <int> <chr>
#> 1 1 y1
#> 2 2 y2
#> 3 4 y4
inner_join(x, y, by = "id")
#> # A tibble: 2 x 3
#> id x y
#> <int> <chr> <chr>
#> 1 1 x1 y1
#> 2 2 x2 y2
left_join(x, y, by = "id")
#> # A tibble: 3 x 3
#> id x y
#> <int> <chr> <chr>
#> 1 1 x1 y1
#> 2 2 x2 y2
#> 3 3 x3 <NA>
right_join(x, y, by = "id")
#> # A tibble: 3 x 3
#> id x y
#> <int> <chr> <chr>
#> 1 1 x1 y1
#> 2 2 x2 y2
#> 3 4 <NA> y4
full_join(x, y, by = "id")
#> # A tibble: 4 x 3
#> id x y
#> <int> <chr> <chr>
#> 1 1 x1 y1
#> 2 2 x2 y2
#> 3 3 x3 <NA>
#> 4 4 <NA> y4

The Relational Data chapter of the R for Data Science book by Garrett Grolemund and Hadley Wickham is an excellent resource for learning more about relational data.
The dplyr two-table verbs vignette and Jenny Bryan’s Cheatsheet for dplyr join functions are also great resources.
The animations were made possible by the newly re-written gganimate package by Thomas Lin Pedersen (original by Dave Robinson). The package readme provides an excellent (and quick) introduction to gganimte.