Description Usage Arguments See Also Examples
Join a table with a string column by a regular expression column in another table
1 2 3 4 5 6 7 8 9 10 11 12 13 | regex_join(x, y, by = NULL, mode = "inner", ignore_case = FALSE)
regex_inner_join(x, y, by = NULL, ignore_case = FALSE)
regex_left_join(x, y, by = NULL, ignore_case = FALSE)
regex_right_join(x, y, by = NULL, ignore_case = FALSE)
regex_full_join(x, y, by = NULL, ignore_case = FALSE)
regex_semi_join(x, y, by = NULL, ignore_case = FALSE)
regex_anti_join(x, y, by = NULL, ignore_case = FALSE)
|
x |
A tbl |
y |
A tbl |
by |
Columns by which to join the two tables |
mode |
One of "inner", "left", "right", "full" "semi", or "anti" |
ignore_case |
Whether to be case insensitive (default no) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(dplyr)
library(ggplot2)
data(diamonds)
diamonds <- tbl_df(diamonds)
d <- data_frame(regex_name = c("^Idea", "mium", "Good"),
type = 1:3)
# When they are inner_joined, only Good<->Good matches
diamonds %>%
inner_join(d, by = c(cut = "regex_name"))
# but we can regex match them
diamonds %>%
regex_inner_join(d, by = c(cut = "regex_name"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.