Closed mcooper closed 2 months ago
I would suggest using the custom_match
argument...
library(countrycode)
countries <- c("Myanmar", "Kosovo", "Republic of Kosovo")
countrycode(countries, "country.name", "iso3c", custom_match = c(Kosovo = "XKK", `Republic of Kosovo` = "XKK"))
#> [1] "MMR" "XKK" "XKK"
I would expect both of these to give the same result, but they dont:
I am trying to make a tweak to codelist for one specific country-code (I want to assign Kosovo an ISO-3 code), and I would like to make
countrycode()
otherwise behave the same. I tried doing that by editingcodelist
, but usingcodelist
as thecustom_dict
seems to have other effects.