Fuzzy Matching in R (Example) | Approximate String, Name & Text Search | adist(), agrep() & amatch()

Описание к видео Fuzzy Matching in R (Example) | Approximate String, Name & Text Search | adist(), agrep() & amatch()

This tutorial provides several examples to help with fuzzy matching (also called fuzzy string searching or approximate string matching) in the R programming language. More details: https://statisticsglobe.com/fuzzy-mat...
Profile of Kirby White: https://statisticsglobe.com/kirby-white
R code of this video:

install.packages("stringdist")
library(stringdist)

pres <- c("Bill Clinton", "Barack Obama")

pres_df <- data.frame(President = c("Joseph R. Biden, Jr", "Donald J. Trump", "Barack H. Obama", "George W. Bush", "William J. Clinton"),
Vice_President = c("Kamala D. Harris", "Michael R. Pence", "Joseph R. Biden", "Dick B. Cheney", "Albert A. Gore, Jr."))

match(pres, pres_df$Presidents)

pres %in% pres_df$Presidents

adist(pres, pres_df$President)

agrep(pres[1], pres_df$President, max.distance = 10, value = TRUE)

agrep(pres[1], pres_df$President, max.distance = 10)

amatch(pres, pres_df$President, maxDist = 10)

pres_df[amatch(pres, pres_df$President, maxDist = 10),]

data.frame(pres = pres,
vice = pres_df[amatch(pres, pres_df$President, maxDist = 10),2])

Follow me on Social Media:
Facebook – Statistics Globe Page:   / statisticsglobecom  
Facebook – Group for Discussions & Questions:   / statisticsglobe  
LinkedIn – Statistics Globe Page:   / statisticsglobe  
LinkedIn – Group for Discussions & Questions:   / 12555223  
Twitter:   / joachimschork  

Music by bensound.com

Комментарии

Информация по комментариям в разработке