Skip to content
Prev 371264 / 398530 Next

ISO3 code to 7 continents names

Well it does actually: There are two different region codes:

First load the package that has countryExData. I'm presuming this is:

library(rworldmap)
Central and Eastern Europ    East Asia and the Pacific                       Europe 
                          19                           18                           24 
   Latin America and Caribbe Middle East and North Africa                North America 
                          24                           19                            2 
                  South Asia           Sub-Saharan Africa 
                           5                           38
Arabian Peninsula Australia + New Zealand               Caribbean 
                      5                       2                       5 
         Central Africa            Central Asia          Central Europe 
                      6                       5                      16 
         Eastern Africa          Eastern Europe                 Mashriq 
                      7                       7                       4 
           Meso America           North America          Northeast Asia 
                      8                       2                       5 
        Northern Africa           South America              South Asia 
                      5                      11                       6 
        South East Asia           South Pacific         Southern Africa 
                      8                       3                      10 
         Western Africa          Western Europe    Western Indian Ocean 
                     13                      19                       2 

Then create the described dataframe:

df<- data.frame(iso3=scan(what="") )
1: USA
2: RUS
3: ARG
4: BGD
5: ITA
6: FRA
7: 
Read 6 items
[1] "Latin America and Caribbe" "South Asia"                "Europe"                   
[4] "Europe"                    "Central and Eastern Europ" "North America"