Package countrycode. February 19, 2015

Similar documents
Package TSfame. February 15, 2013

Package retrosheet. April 13, 2015

Package dunn.test. January 6, 2016

Package pdfetch. R topics documented: July 19, 2015

Package R4CDISC. September 5, 2015

Package StockChina. January 30, 2016

Package psdata. February 10, 2016

Package franc. R topics documented: November 12, Title Detect the Language of Text Version 1.1.1

Package plan. R topics documented: February 20, 2015

Package fimport. February 19, 2015

Package HadoopStreaming

Package uptimerobot. October 22, 2015

Package bizdays. March 13, 2015

Package cgdsr. August 27, 2015

Package searchconsoler

Package empiricalfdr.deseq2

Package erp.easy. September 26, 2015

Package tagcloud. R topics documented: July 3, 2015

Package syuzhet. February 22, 2015

Package ChannelAttribution

Package hazus. February 20, 2015

Package sjdbc. R topics documented: February 20, 2015

Package translater. R topics documented: February 20, Type Package

Package sendmailr. February 20, 2015

Package MBA. February 19, Index 7. Canopy LIDAR data

Package benford.analysis

Package urltools. October 11, 2015

Package pinnacle.api

Package pesticides. February 20, 2015

Package RCassandra. R topics documented: February 19, Version Title R/Cassandra interface

Package pxr. February 20, 2015

Package missforest. February 20, 2015

Package CRM. R topics documented: February 19, 2015

Package brewdata. R topics documented: February 19, Type Package

Package survpresmooth

Package Rdsm. February 19, 2015

Package hoarder. June 30, 2015

Package VideoComparison

Package treemap. February 15, 2013

Package LexisPlotR. R topics documented: April 4, Type Package

Package gazepath. April 1, 2015

Package png. February 20, 2015

Package OECD. R topics documented: January 17, Type Package Title Search and Extract Data from the OECD Version 0.2.

Package AzureML. August 15, 2015

Package xtal. December 29, 2015

Investment in developing countries' food and agriculture: Assessing agricultural capital stocks and their impact on productivity

Package GSA. R topics documented: February 19, 2015

Package decompr. August 17, 2016

Package EasyHTMLReport

Package CIFsmry. July 10, Index 6

Package rivr. October 16, 2015

Package DCG. R topics documented: June 8, Type Package

Package bigdata. R topics documented: February 19, 2015

Package whoapi. R topics documented: June 26, Type Package Title A 'Whoapi' API Client Version Date Author Oliver Keyes

Package RDSTK. February 19, 2015

Package jrvfinance. R topics documented: October 6, 2015

Package hive. January 10, 2011

Package whisker. R topics documented: February 20, 2015

Package PKI. July 28, 2015

Package globe. August 29, 2016

Package SHELF. February 5, 2016

Package changepoint. R topics documented: November 9, Type Package Title Methods for Changepoint Detection Version 2.

Package smoothhr. November 9, 2015

Package RIGHT. March 30, 2015

Package dsstatsclient

Package PKI. February 20, 2013

Package obs.agree. February 20, 2015

Package COSINE. February 19, 2015

Package MDM. February 19, 2015

Package tablaxlsx. R topics documented: June 9, 2016

Package klausur. February 20, 2015

Package TimeWarp. R topics documented: April 1, 2015

Package EstCRM. July 13, 2015

Core Fittings C-Core and CD-Core Fittings

Package hive. July 3, 2015

Package date. R topics documented: February 19, Version Title Functions for handling dates. Description Functions for handling dates.

Package easyanova. February 19, 2015

Package wordcloud. R topics documented: February 20, 2015

Package mpa. R topics documented: February 15, Type Package. Title CoWords Method. Version Date

Package optirum. December 31, 2015

Package GEOquery. August 18, 2015

USING MAGENTO TRANSLATION TOOLS

Package CoImp. February 19, 2015

Package dsmodellingclient

Package forensic. February 19, 2015

Package dfoptim. July 10, 2016

Package polynom. R topics documented: June 24, Version 1.3-8

Package mcmcse. March 25, 2016

Package YieldCurve. February 19, 2015

Package PACVB. R topics documented: July 10, Type Package

Package robfilter. R topics documented: February 20, Version 4.1 Date Title Robust Time Series Filters

Package ggrepel. February 8, 2016

Package multivator. R topics documented: February 20, Type Package Title A multivariate emulator Version Depends R(>= 2.10.

Package schoolmath. R topics documented: February 20, Type Package

Package neuralnet. February 20, 2015

Package packrat. R topics documented: March 28, Type Package

Package cpm. July 28, 2015

Package ATE. R topics documented: February 19, Type Package Title Inference for Average Treatment Effects using Covariate. balancing.

Package AMORE. February 19, 2015

Package lmertest. July 16, 2015

Transcription:

Package countrycode February 19, 2015 Maintainer Vincent Arel-Bundock <vincent.arel-bundock@umontreal.ca> License GPL-3 Title Convert Country Names and Country Codes LazyData yes Type Package LazyLoad yes Encoding UTF-8 Author Vincent Arel-Bundock <vincent.arel-bundock@umontreal.ca> Standardize country names, convert them into one of eleven coding schemes, convert between coding schemes, and assign region descriptors. Version 0.18 URL https://github.com/vincentarelbundock/countrycode Date 2014-12-17 Suggests testthat (>= 0.5) NeedsCompilation no Repository CRAN Date/Publication 2014-12-29 07:23:12 R topics documented: countrycode-package.................................... 2 countrycode......................................... 2 countrycode_data...................................... 3 Index 5 1

2 countrycode countrycode-package Convert Country Codes or Country Names Convert country codes or country names Details 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. Author(s) Vincent Arel-Bundock <varel@umich.edu> References http://www.umich.edu/~varel https://github.com/vincentarelbundock/countrycode countrycode Convert Country Codes Converts long country names into one of many different coding schemes. Translates from one scheme to another. Converts country name or coding scheme to the official short English country name. Creates a new variable with the name of the continent or region to which each country belongs. Usage countrycode(sourcevar, origin, destination, warn = FALSE) Arguments sourcevar Vector which contains the codes or country names to be converted origin Coding scheme of origin (name enclosed in quotes "") destination Coding scheme of destination (name enclosed in quotes "") warn Prints unique elements from sourcevar for which no match was found

countrycode_data 3 Note Supports the following coding schemes: Correlates of War character, CoW-numeric, ISO3-character, ISO3-numeric, ISO2-character, IMF numeric, International Olympic Committee, FIPS 10-4, FAO numeric, United Nations numeric, World Bank character, official English short country names (ISO), continent, region. The following strings can be used as arguments for origin or destination: "cowc", "cown", "iso3c", "iso3n", "iso2c", "imf", "fips104", "fao", "ioc", "un", "wb", "country.name". The following strings can be used as arguments for destination only: "continent", "region" Examples codes.of.origin <- countrycode::countrycode_data$cowc # Vector of values to be converted countrycode(codes.of.origin, "cowc", "iso3c") countrycode_data Country Code Translation Data Frame Usage Format Details A data frame with 262 observations on the following 15 variables. Used internally by the countrycode() function. countrycode_data A data frame with 260 rows and 11 columns country.name: Long country name cowc: Correlates of War character cown: Correlates of War numeric fao: Food and Agriculture Organization of the United Nations numerical code fips104: FIPS 10-4 (Federal Information Processing Standard) imf: International Monetary Fund iso2c: ISO-2 character iso3c: ISO-3 character iso2n: ISO-2 numeric iso3n: ISO-3 numeric un: United Nations numerical code

4 countrycode_data Note wb: World Bank (very similar but not identical to iso3c) ioc: International Olympic Committee regex: Regular expression used to convert long names to code region: Regions as defined in the World Bank Development Indicators continent: Continent as defined in the World Bank Development Indicators To produce consistent conversion, some entries had to be removed from the conversion data frame. For example, the Correlates of War include 4 different codes to represent Western Germany. "countrycode" uses only one of them (CoW code 260 for all years). Similar choices were made in the cases of Korea, Yemen, Congo and Vietnam. Also, Namibia s iso2c code ("NA") can be understood as a missing observation (NA) by R. Capitalized country names refer to the official short English names, as defined by the ISO organization. ISO does not publish official short English names for countries whose name is not capitalized in the the country.name vector. Continent and region information was taken from the UN website. This is a (possibly incomplete) list of countries and codes that were dropped: KOREA, REPUBLIC OF: cown 731 730, cowc PRK KOR YEMEN: cown 680 678, cowc YAR YPR GERMANY: cown 267 260 245, cowc BAV GFR BAD CONGO: cown 490, cowc 484 VIET NAM: cown 816, cowc DRV

Index Topic countrycode countrycode, 2 Topic datasets countrycode_data, 3 Topic package countrycode-package, 2 countrycode, 2 countrycode-package, 2 countrycode_data, 3 5