# NOT RUN {
books <- data.frame(
name = I(c("Tukey", "Venables", "Tierney","Ripley",
"Ripley", "McNeil", "R Core")),
title = c("Exploratory Data Analysis",
"Modern Applied Statistics ...",
"LISP-STAT",
"Spatial Statistics", "Stochastic Simulation",
"Interactive Data Analysis",
"An Introduction to R"),
other.author = c(NA, "Ripley", NA, NA, NA, NA,"Venables & Smith"))
authors <- data.frame(
surname = I(c("Tukey", "Venables", "Tierney", "Ripley", "McNeil","Asimov")),
nationality = c("US", "Australia", "US", "UK", "Australia","US"),
deceased = c("yes", rep("no", 4),"yes"))
tmp <- left_join_(books,authors, by.x = "name", by.y = "surname")
head(tmp)
tmp <- inner_join_(books,authors, by.x = "name", by.y = "surname")
head(tmp)
tmp <- full_join_(books,authors, by.x = "name", by.y = "surname")
head(tmp)
tmp <- right_join_(books,authors, by.x = "name", by.y = "surname")
head(tmp)
tmp <- semi_join_(books,authors, by.x = "name", by.y = "surname")
head(tmp)
tmp <- anti_join_(books,authors, by.x = "name", by.y = "surname")
head(tmp)
# }
Run the code above in your browser using DataLab