# NOT RUN {
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"))
# }
Run the code above in your browser using DataLab