stringdist icon indicating copy to clipboard operation
stringdist copied to clipboard

Apparent inconsistency in output when both the number of characters of a & b are smaller than q

Open fabiocs8 opened this issue 1 year ago • 1 comments

Consider the NA correct result of:

stringdist(   "", "XXX"
              , method = "cos"
              , q = 3)

However, if both a and b have nchar() < q, the output becomes 0:

stringdist(   "", "XX"
              , method = "cos"
              , q = 3)

In my view, the output for the second case would be more consistent if it were NA also. Does it make sense?

fabiocs8 avatar Apr 30 '23 15:04 fabiocs8