Transcribe multiple fixes to the same toponym
Error when multiple items in the fixes
argument passed to transcribe()
point to the same value.
library(topomatch)
terms <- c("foo", "bar", "foobar", "X")
(mat <- topomatch(terms, c("Foo", "Bar")))
#> 2 names matched exactly: foo, bar
#>
#> 1 matches based on similarity:
#> 1. foobar: Foo
#>
#> 1 unresolved matches:
#> 1. X: Foo, Bar
## Resolve the matches by setting both terms to Foo
trf <- transcribe(mat, fixes = c(foobar = "Foo", X = "Foo"))
trf(terms)
#> Error in trf(terms): Cannot transcribe foobar.
#> Please fix these unmatched terms using fixes.
Created on 2021-07-06 by the reprex package (v2.0.0)