This function wraps around stringdist::stringdist().

str_dist(a, b, method = "osa", ...)

Arguments

a

R object (target); will be converted by base::as.character().

b

R object (source); will be converted by base::as.character().

method

Method for distance calculation. The default is "osa."

...

Other arguments passed to stringdist::stringdist().

Value

The distance between string a and string b.

Examples

str_dist(a = "BRULINGTN", b = "BURLINGTON")
#> [1] 2