Seyma Kalay
Seyma Kalay

Reputation: 2859

ISO-3 of all the countries in R

I am trying to make a map that looks like this so where can I get the ISO-3 of all the countries. many thanks in advance.

Upvotes: 0

Views: 534

Answers (1)

bttomio
bttomio

Reputation: 2306

You could use this code:

library(rnaturalearth)
countries <- ne_countries()
countries@data[["iso_a3"]]

More info about the package rnaturalearth: https://docs.ropensci.org/rnaturalearth/articles/rnaturalearth.html

Upvotes: 1

Related Questions