-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathdifference_join.Rd
More file actions
61 lines (46 loc) · 1.51 KB
/
difference_join.Rd
File metadata and controls
61 lines (46 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/difference_join.R
\name{difference_join}
\alias{difference_join}
\alias{difference_inner_join}
\alias{difference_left_join}
\alias{difference_right_join}
\alias{difference_full_join}
\alias{difference_semi_join}
\alias{difference_anti_join}
\title{Join two tables based on absolute difference between their columns}
\usage{
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)
}
\arguments{
\item{x}{A tbl.}
\item{y}{A tbl.}
\item{by}{Columns by which to join the two tables.}
\item{max_dist}{Maximum distance to use for joining.}
\item{mode}{One of "inner", "left", "right", "full" "semi", or "anti"}
\item{distance_col}{If given, will add a column with this name containing the
difference between the two.}
}
\description{
Join two tables based on absolute difference between their columns
}
\examples{
library(dplyr)
head(iris)
sepal_lengths <- tibble::tibble(Sepal.Length = c(5, 6, 7), Type = 1:3)
iris \%>\%
difference_inner_join(sepal_lengths, max_dist = .5)
}