countrycode-package: Convert Country Codes or Country Names


Convert country codes or country names


The countrycode function can convert to and from 12 different country coding schemes. It uses regular expressions to convert long country names (e.g. Sri Lanka) into any of those coding schemes, or into standardized country names (official short English). It can create variables with the name of the continent and/or region to which each country belongs.


Vincent Arel-Bundock


Questions? Problems? Suggestions? or email at

All documentation is copyright its authors; we didn't write any of that.