tests/testthat/test_clean_strings.R

test_that("clean strings removes replacements", {
  names <- c("abc corp", "abc corporation")
  cleaned <- clean_strings(names, common_words = data.table(word = "corp",
                                                            replacement = "corporation"),
                           remove_words = T)
  expect_identical(cleaned, c("abc", "abc"))
})

Try the fedmatch package in your browser

Any scripts or data that you put into this service are public.

fedmatch documentation built on Nov. 23, 2021, 1:07 a.m.