vincentarelbundock / countrycode

R package: Convert country names and country codes. Assigns region descriptors.
https://vincentarelbundock.github.io/countrycode
GNU General Public License v3.0
346 stars 84 forks source link

Mircronesia missing in iso2c #289

Closed herrmol closed 2 years ago

herrmol commented 2 years ago

It seems that the iso2c for Micronesia is missing though the iso2c code for Micronesia is "FM".

vincentarelbundock commented 2 years ago

I think there is a distinction between:

library(countrycode)

countrycode("Micronesia", "country.name", "iso2c")
## Warning in countrycode_convert(sourcevar = sourcevar, origin = origin, destination = dest, : Some values were not matched unambiguously: Micronesia

## [1] NA
countrycode("Federated States of Micronesia", "country.name", "iso2c")
## [1] "FM"

You can use the custom_match argument to fill in the missing values if you want to assign "Micronesia" to an iso2c code.