ctryCodeToName: Convert a country ISO3 code to the full name

Description Usage Arguments Value Examples

View source: R/ctrycode.R

Description

Convert a country ISO3 code to the full name. Exposes the rworldmap function isoToName(ctryCode). #rworldmap::isoToName can resolve 2-letter ctryCodes but we only want 3-letter ISO3 codes. With no parameters returns a list of ctryCodes and their corresponding names as given by rworldMap::getMap@data

Usage

1
ctryCodeToName(ctryCodes)

Arguments

ctryCodes

The country Codes to search for

Value

Character The full country name if the ctryCode is found. If ctryCode is not supplied then return a list of all country codes and their corresponding names

Examples

1
2
3
4
5
6
7
ctryCodeToName("KEN") #returns Kenya

ctryCodeToName("ARE") #returns United Arab Emirates

ctryCodeToName("USA") #returns United States of America

ctryCodeToName("JAM") #returns Jamaica

chrisvwn/Rnightlights documentation built on Sept. 7, 2021, 1:44 a.m.