all AI news
Table joins with conditional “fuzzy” string matching in R
June 24, 2023, midnight | R on Pablo Bernabeu
R-bloggers www.r-bloggers.com
Here’s an example of fuzzy-matching strings in R that I shared on StackOverflow. In stringdist_join, the max_dist argument is used to constrain the degree of fuzziness.
library(fuzzyjoin)
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(knitr)
small_tab = data.frame(Food.Name = c('Corn', 'Squash', 'Peppers'),
Food.Code = c(NA, NA, NA))
large_tab = data.frame(Food.Name = c('Sweet Corn', 'Red Corn', …
dplyr example filter fuzzy-matching library objects package r bloggers stackoverflow stats string table
More from www.r-bloggers.com / R-bloggers
Jobs in AI, ML, Big Data
Lead Developer (AI)
@ Cere Network | San Francisco, US
Research Engineer
@ Allora Labs | Remote
Ecosystem Manager
@ Allora Labs | Remote
Founding AI Engineer, Agents
@ Occam AI | New York
AI Engineer Intern, Agents
@ Occam AI | US
AI Research Scientist
@ Vara | Berlin, Germany and Remote