Learn R Programming

states (version 0.3.2)

country_names: Country names

Description

Country names

Usage

country_names(x, list = "GW", shorten = FALSE)

Arguments

x

(numeric())
A vector of numeric country codes

list

(logical(1))
Which states list to use? Only "GW" at this time.

shorten

(logical(1))
Shorten some of the longer country names like "Macedonia, the former Yugoslav Republic of"?

Examples

Run this code
data("gwstates")
codes <- gwstates$gwcode
cn    <- country_names(codes)
cs    <- country_names(codes, shorten = TRUE)
data.frame(gwcode = codes, country_name = cn, short_names = cs)

Run the code above in your browser using DataLab