I have two data frames
Word1<-c("bat", "ban", "bait")
df1<-data.frame(Word1, stringsAsFactors=FALSE)
and
Word2<-c("cat", "cab", "ban", "at", "done", "dot", "ran", "cant")
df2<-data.frame(Word2, stringsAsFactors=FALSE)
I want to calculate levenshtein distance for words in df1, using the Words in df2
I want something like this:
Word1<-c("bat", "ban", "bait")
links<-c("cat, ban, at", "ran","")
counts<-c("3","1","0")
df3<-data.frame(Word1, links, counts, stringsAsFactors=FALSE)
Its similar to my previous question in calculation but requires two separate data frames. here's the link for the question:
calculate number and names of similar sounding words from a data frame
phonetic()
fromstringdist
library. – tmfmnk