Country names

country_names(x, list = "GW", shorten = FALSE)

Arguments

x

(numeric())
A vector of numeric country codes

list

(logical(1))
Which states list to use? Only "GW" at this time.

shorten

(logical(1))
Shorten some of the longer country names like "Macedonia, the former Yugoslav Republic of"?

Examples

data("gwstates")
codes <- gwstates$gwcode
cn    <- country_names(codes)
cs    <- country_names(codes, shorten = TRUE)
data.frame(gwcode = codes, country_name = cn, short_names = cs)
#>     gwcode                            country_name                short_names
#> 1        2                United States of America                        USA
#> 2       20                                  Canada                     Canada
#> 3       31                                 Bahamas                    Bahamas
#> 4       40                                    Cuba                       Cuba
#> 5       41                                   Haiti                      Haiti
#> 6       41                                   Haiti                      Haiti
#> 7       42                      Dominican Republic         Dominican Republic
#> 8       51                                 Jamaica                    Jamaica
#> 9       52                     Trinidad and Tobago        Trinidad and Tobago
#> 10      53                                Barbados                   Barbados
#> 11      70                                  Mexico                     Mexico
#> 12      80                                  Belize                     Belize
#> 13      89     United Provinces of Central America         FR Central America
#> 14      90                               Guatemala                  Guatemala
#> 15      91                                Honduras                   Honduras
#> 16      92                             El Salvador                El Salvador
#> 17      93                               Nicaragua                  Nicaragua
#> 18      94                              Costa Rica                 Costa Rica
#> 19      95                                  Panama                     Panama
#> 20      99                          Great Colombia             Great Colombia
#> 21     100                                Colombia                   Colombia
#> 22     101                               Venezuela                  Venezuela
#> 23     110                                  Guyana                     Guyana
#> 24     115                                 Surinam                    Surinam
#> 25     130                                 Ecuador                    Ecuador
#> 26     135                                    Peru                       Peru
#> 27     140                                  Brazil                     Brazil
#> 28     145                                 Bolivia                    Bolivia
#> 29     150                                Paraguay                   Paraguay
#> 30     155                                   Chile                      Chile
#> 31     160                               Argentina                  Argentina
#> 32     165                                 Uruguay                    Uruguay
#> 33     200                          United Kingdom                         UK
#> 34     205                                 Ireland                    Ireland
#> 35     210                             Netherlands                Netherlands
#> 36     211                                 Belgium                    Belgium
#> 37     212                              Luxembourg                 Luxembourg
#> 38     220                                  France                     France
#> 39     225                             Switzerland                Switzerland
#> 40     230                                   Spain                      Spain
#> 41     235                                Portugal                   Portugal
#> 42     240                                 Hanover                    Hanover
#> 43     245                                 Bavaria                    Bavaria
#> 44     255                       Germany (Prussia)          Germany (Prussia)
#> 45     260                 German Federal Republic                    Germany
#> 46     265              German Democratic Republic German Democratic Republic
#> 47     267                                   Baden                      Baden
#> 48     269                                  Saxony                     Saxony
#> 49     271                             Wurttemberg                Wurttemberg
#> 50     273                Hesse-Kassel (Electoral)   Hesse-Kassel (Electoral)
#> 51     275                 Hesse-Darmstadt (Ducal)    Hesse-Darmstadt (Ducal)
#> 52     280                    Mecklenburg-Schwerin       Mecklenburg-Schwerin
#> 53     290                                  Poland                     Poland
#> 54     300                         Austria-Hungary            Austria-Hungary
#> 55     305                                 Austria                    Austria
#> 56     310                                 Hungary                    Hungary
#> 57     315                          Czechoslovakia             Czechoslovakia
#> 58     316                          Czech Republic             Czech Republic
#> 59     317                                Slovakia                   Slovakia
#> 60     325                          Italy/Sardinia                      Italy
#> 61     327                            Papal States               Papal States
#> 62     329                            Two Sicilies               Two Sicilies
#> 63     332                                  Modena                     Modena
#> 64     335                                   Parma                      Parma
#> 65     337                                 Tuscany                    Tuscany
#> 66     338                                   Malta                      Malta
#> 67     339                                 Albania                    Albania
#> 68     341                              Montenegro                 Montenegro
#> 69     341                              Montenegro                 Montenegro
#> 70     343 Macedonia (Former Yugoslav Republic of)            North Macedonia
#> 71     344                                 Croatia                    Croatia
#> 72     340                                  Serbia                     Serbia
#> 73     340                                  Serbia                     Serbia
#> 74     345                              Yugoslavia                 Yugoslavia
#> 75     346                      Bosnia-Herzegovina         Bosnia-Herzegovina
#> 76     347                                  Kosovo                     Kosovo
#> 77     349                                Slovenia                   Slovenia
#> 78     350                                  Greece                     Greece
#> 79     352                                  Cyprus                     Cyprus
#> 80     355                                Bulgaria                   Bulgaria
#> 81     359                                 Moldova                    Moldova
#> 82     360                                 Romania                    Romania
#> 83     365                   Russia (Soviet Union)                     Russia
#> 84     366                                 Estonia                    Estonia
#> 85     366                                 Estonia                    Estonia
#> 86     367                                  Latvia                     Latvia
#> 87     367                                  Latvia                     Latvia
#> 88     368                               Lithuania                  Lithuania
#> 89     368                               Lithuania                  Lithuania
#> 90     369                                 Ukraine                    Ukraine
#> 91     370                   Belarus (Byelorussia)                    Belarus
#> 92     371                                 Armenia                    Armenia
#> 93     372                                 Georgia                    Georgia
#> 94     373                              Azerbaijan                 Azerbaijan
#> 95     375                                 Finland                    Finland
#> 96     380                                  Sweden                     Sweden
#> 97     385                                  Norway                     Norway
#> 98     390                                 Denmark                    Denmark
#> 99     395                                 Iceland                    Iceland
#> 100    402                              Cape Verde                 Cape Verde
#> 101    404                           Guinea-Bissau              Guinea-Bissau
#> 102    411                       Equatorial Guinea          Equatorial Guinea
#> 103    420                                  Gambia                     Gambia
#> 104    432                                    Mali                       Mali
#> 105    433                                 Senegal                    Senegal
#> 106    434                                   Benin                      Benin
#> 107    435                              Mauritania                 Mauritania
#> 108    436                                   Niger                      Niger
#> 109    437                           Cote D'Ivoire              Cote D'Ivoire
#> 110    438                                  Guinea                     Guinea
#> 111    439              Burkina Faso (Upper Volta)               Burkina Faso
#> 112    450                                 Liberia                    Liberia
#> 113    451                            Sierra Leone               Sierra Leone
#> 114    452                                   Ghana                      Ghana
#> 115    461                                    Togo                       Togo
#> 116    471                                Cameroon                   Cameroon
#> 117    475                                 Nigeria                    Nigeria
#> 118    481                                   Gabon                      Gabon
#> 119    482                Central African Republic                        CAR
#> 120    483                                    Chad                       Chad
#> 121    484                                   Congo                      Congo
#> 122    490   Congo, Democratic Republic of (Zaire)                   DR Congo
#> 123    500                                  Uganda                     Uganda
#> 124    501                                   Kenya                      Kenya
#> 125    510                     Tanzania/Tanganyika                   Tanzania
#> 126    511                                Zanzibar                   Zanzibar
#> 127    516                                 Burundi                    Burundi
#> 128    517                                  Rwanda                     Rwanda
#> 129    520                                 Somalia                    Somalia
#> 130    522                                Djibouti                   Djibouti
#> 131    530                                Ethiopia                   Ethiopia
#> 132    531                                 Eritrea                    Eritrea
#> 133    540                                  Angola                     Angola
#> 134    541                              Mozambique                 Mozambique
#> 135    551                                  Zambia                     Zambia
#> 136    552                     Zimbabwe (Rhodesia)                   Zimbabwe
#> 137    553                                  Malawi                     Malawi
#> 138    560                            South Africa               South Africa
#> 139    563                               Transvaal                  Transvaal
#> 140    564                       Orange Free State          Orange Free State
#> 141    565                                 Namibia                    Namibia
#> 142    570                                 Lesotho                    Lesotho
#> 143    571                                Botswana                   Botswana
#> 144    572                               Swaziland                  Swaziland
#> 145    580                              Madagascar                 Madagascar
#> 146    580                              Madagascar                 Madagascar
#> 147    581                                 Comoros                    Comoros
#> 148    590                               Mauritius                  Mauritius
#> 149    600                                 Morocco                    Morocco
#> 150    600                                 Morocco                    Morocco
#> 151    615                                 Algeria                    Algeria
#> 152    615                                 Algeria                    Algeria
#> 153    616                                 Tunisia                    Tunisia
#> 154    616                                 Tunisia                    Tunisia
#> 155    620                                   Libya                      Libya
#> 156    620                                   Libya                      Libya
#> 157    625                                   Sudan                      Sudan
#> 158    626                             South Sudan                South Sudan
#> 159    630                           Iran (Persia)                       Iran
#> 160    640                 Turkey (Ottoman Empire)                     Turkey
#> 161    645                                    Iraq                       Iraq
#> 162    651                                   Egypt                      Egypt
#> 163    651                                   Egypt                      Egypt
#> 164    652                                   Syria                      Syria
#> 165    660                                 Lebanon                    Lebanon
#> 166    663                                  Jordan                     Jordan
#> 167    666                                  Israel                     Israel
#> 168    670                            Saudi Arabia               Saudi Arabia
#> 169    678          Yemen (Arab Republic of Yemen)                      Yemen
#> 170    680             Yemen, People's Republic of                South Yemen
#> 171    690                                  Kuwait                     Kuwait
#> 172    692                                 Bahrain                    Bahrain
#> 173    694                                   Qatar                      Qatar
#> 174    696                    United Arab Emirates       United Arab Emirates
#> 175    698                                    Oman                       Oman
#> 176    700                             Afghanistan                Afghanistan
#> 177    700                             Afghanistan                Afghanistan
#> 178    701                            Turkmenistan               Turkmenistan
#> 179    702                              Tajikistan                 Tajikistan
#> 180    703                         Kyrgyz Republic                 Kyrgyzstan
#> 181    704                              Uzbekistan                 Uzbekistan
#> 182    705                              Kazakhstan                 Kazakhstan
#> 183    710                                   China                      China
#> 184    711                                   Tibet                      Tibet
#> 185    712                                Mongolia                   Mongolia
#> 186    713                                  Taiwan                     Taiwan
#> 187    730                                   Korea                      Korea
#> 188    731             Korea, People's Republic of                North Korea
#> 189    732                      Korea, Republic of                South Korea
#> 190    740                                   Japan                      Japan
#> 191    750                                   India                      India
#> 192    760                                  Bhutan                     Bhutan
#> 193    770                                Pakistan                   Pakistan
#> 194    771                              Bangladesh                 Bangladesh
#> 195    775                         Myanmar (Burma)                    Myanmar
#> 196    775                         Myanmar (Burma)                    Myanmar
#> 197    780                      Sri Lanka (Ceylon)                  Sri Lanka
#> 198    781                                Maldives                   Maldives
#> 199    790                                   Nepal                      Nepal
#> 200    800                                Thailand                   Thailand
#> 201    811                    Cambodia (Kampuchea)                   Cambodia
#> 202    812                                    Laos                       Laos
#> 203    815     Vietnam (Annam/Cochin China/Tonkin)                    Vietnam
#> 204    816         Vietnam, Democratic Republic of                    Vietnam
#> 205    817                    Vietnam, Republic of              South Vietnam
#> 206    820                                Malaysia                   Malaysia
#> 207    830                               Singapore                  Singapore
#> 208    835                                  Brunei                     Brunei
#> 209    840                             Philippines                Philippines
#> 210    850                               Indonesia                  Indonesia
#> 211    860                              East Timor                 East Timor
#> 212    900                               Australia                  Australia
#> 213    910                        Papua New Guinea           Papua New Guinea
#> 214    920                             New Zealand                New Zealand
#> 215    940                         Solomon Islands            Solomon Islands
#> 216    950                                    Fiji                       Fiji
#> 217     54                                Dominica                   Dominica
#> 218     55                                 Grenada                    Grenada
#> 219     56                             Saint Lucia                Saint Lucia
#> 220     57        Saint Vincent and the Grenadines              Saint Vincent
#> 221     58                       Antigua & Barbuda          Antigua & Barbuda
#> 222     60                   Saint Kitts and Nevis      Saint Kitts and Nevis
#> 223    221                                  Monaco                     Monaco
#> 224    223                           Liechtenstein              Liechtenstein
#> 225    331                              San Marino                 San Marino
#> 226    232                                 Andorra                    Andorra
#> 227    396                                Abkhazia                   Abkhazia
#> 228    397                           South Ossetia              South Ossetia
#> 229    403                   Sao Tome and Principe      Sao Tome and Principe
#> 230    591                              Seychelles                 Seychelles
#> 231    935                                 Vanuatu                    Vanuatu
#> 232    970                                Kiribati                   Kiribati
#> 233    971                                   Nauru                      Nauru
#> 234    972                                   Tonga                      Tonga
#> 235    973                                  Tuvalu                     Tuvalu
#> 236    983                        Marshall Islands           Marshall Islands
#> 237    986                                   Palau                      Palau
#> 238    987          Federated States of Micronesia                 Micronesia
#> 239    990                     Samoa/Western Samoa        Samoa/Western Samoa