I'm trying to use stringdist to identify all strings with a max distance of 1 in the same vector, and then publish the match. Here is a sample of the data:
Starting data frame:
a = c("tom", "tomm", "alex", "alexi", "chris", "jen", "jenn", "michell")
b = c(NA)
df = data.frame(a,b)
Desired results:
a = c("tom", "tomm", "alex", "alexi", "chris", "jen", "jenn", "michell")
b = c("tomm", "tom", "alexi", "alex", 0, "jenn", "jen", 0)
df = data.frame(a,b)
I can use stringdist for two vectors, but am having trouble using it for one vector. Thanks for your help, R community.