stringdist.handle.NAs: do stringdist but handle NAs in a way that is appropriate to...

Description Usage Arguments Value Examples

Description

It seems that stringdist returns NA when any strings being compared to are NA. I needed somethign else.

Usage

1

Arguments

x

character vector

y

character vector of same length as x.

...

other arguments to pass to the function stringdist

Value

returns the string distance between the i-th element in x and the i-th element in y and returns a vector with length=length(x) containing NAs wherever x or y was NA.

Examples

1
stringdist.handle.NAs(c("Big", "Bad", "Bob", NA), c(NA, "Bed", "Bob", NA))

eriqande/swfsc.mega.tools documentation built on May 16, 2019, 8:48 a.m.