For matching up country names, it's hard to beat the package "countrycode". It allows conversion across many different country codes and country names, and it also has continents.
Matt -----Original Message----- From: R-sig-Geo [mailto:[email protected]] On Behalf Of Barry Rowlingson Sent: Friday, September 8, 2017 4:28 AM To: Miluji Sb <[email protected]> Cc: R-sig-geo mailing list <[email protected]> Subject: Re: [R-sig-Geo] ISO3 to 7 continents names On Thu, Sep 7, 2017 at 7:35 PM, Miluji Sb <[email protected]> wrote: > Dear all. > > Is it possible to convert.identify iso3 country names to the seven > continent names? > > # Asia, Africa, Antarctica, Australia, Europe, South America, and > North America, > > I have tried the following: > > ### > region <- merge(countryExData,df,by.x='ISO3V10',by.y='iso3') > > where df is the name of my dataset with iso3 the identification > variable but there seems to be a a lot of missing values. > > Hard to help you here without seeing at least some of your data, or at least the rows that didn't match. Maybe you've got invalid codes in your data? How can we tell? Also, you should say where countryExData comes from, I had to guess it was from the rworldmap package. That data frame doesn't have the "continent" in it, so what use is it to you? Barry [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-geo _______________________________________________ R-sig-Geo mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-geo
