Gevorderde reguliere expressies in R
Angelo Zehr
Data Journalist


Voor de stringvergelijking:
small_str_distance <- function(left, right) {
stringdist(left, right) <= 5
}
Voor de getalvergelijking:
close_to_each_other <- function(left, right) {
abs(left - right) <= 3
}
fuzzy_left_join(
a, b,
by = c(
"title" = "prod_title",
"year" = "prod_year"
),
match_fun = c(
"title" = small_str_distance,
"year" = close_to_each_other
)
)

Gevorderde reguliere expressies in R