R में Intermediate Regular Expressions
Angelo Zehr
Data Journalist


स्ट्रिंग तुलना के लिए:
small_str_distance <- function(left, right) {
stringdist(left, right) <= 5
}
नंबर तुलना के लिए:
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
)
)

R में Intermediate Regular Expressions