[R-sig-Geo] ISO3 to 7 continents names

Matt Landis matt.landis at rsginc.com
Fri Sep 8 14:17:46 CEST 2017


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:r-sig-geo-bounces at r-project.org] On Behalf Of Barry Rowlingson
Sent: Friday, September 8, 2017 4:28 AM
To: Miluji Sb <milujisb at gmail.com>
Cc: R-sig-geo mailing list <r-sig-geo at r-project.org>
Subject: Re: [R-sig-Geo] ISO3 to 7 continents names

On Thu, Sep 7, 2017 at 7:35 PM, Miluji Sb <milujisb at gmail.com> 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
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list