Convert country codes or country names
countrycode function can convert to and from several different
country coding schemes. It uses regular expressions to convert country
names (e.g. Sri Lanka) into any of those coding schemes, or into
standardized country names in several languages. It can create variables
with the name of the continent and/or several regional groupings to which
each country belongs.
Type ?codelist to get a list of available origin and destination codes.