ISO3 to 7 continents names

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ISO3 to 7 continents names

Miluji Sb
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.

Thank you!

Sincerely,

Milu

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: ISO3 to 7 continents names

Barry Rowlingson
On Thu, Sep 7, 2017 at 7:35 PM, Miluji Sb <[hidden email]> 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
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: ISO3 to 7 continents names

Matt Landis
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:[hidden email]] On Behalf Of Barry Rowlingson
Sent: Friday, September 8, 2017 4:28 AM
To: Miluji Sb <[hidden email]>
Cc: R-sig-geo mailing list <[hidden email]>
Subject: Re: [R-sig-Geo] ISO3 to 7 continents names

On Thu, Sep 7, 2017 at 7:35 PM, Miluji Sb <[hidden email]> 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
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo