Join two tables based on absolute difference between their columns
difference_join(
x,
y,
by = NULL,
max_dist = 1,
mode = "inner",
distance_col = NULL
)difference_inner_join(x, y, by = NULL, max_dist = 1, distance_col = NULL)
difference_left_join(x, y, by = NULL, max_dist = 1, distance_col = NULL)
difference_right_join(x, y, by = NULL, max_dist = 1, distance_col = NULL)
difference_full_join(x, y, by = NULL, max_dist = 1, distance_col = NULL)
difference_semi_join(x, y, by = NULL, max_dist = 1, distance_col = NULL)
difference_anti_join(x, y, by = NULL, max_dist = 1, distance_col = NULL)
A tbl
A tbl
Columns by which to join the two tables
Maximum distance to use for joining
One of "inner", "left", "right", "full" "semi", or "anti"
If given, will add a column with this name containing the difference between the two
# NOT RUN {
library(dplyr)
head(iris)
sepal_lengths <- data_frame(Sepal.Length = c(5, 6, 7), Type = 1:3)
iris %>%
difference_inner_join(sepal_lengths, max_dist = .5)
# }
Run the code above in your browser using DataLab