iso3_to_regions: Get regions from ISO3 country codes.

Description Usage Arguments Value

View source: R/codes.R

Description

iso3_to_regions() takes in a vector of ISO3 codes and returns regions specified by the user. Currently, this can be codes or English names for UN regions/subregions, WHO regions, and World Bank Income Groups.

Usage

1
2
3
4
5
6
7
iso3_to_regions(
  iso3,
  region = c("who_region", "un_region", "un_subregion", "wb_ig"),
  year = max(wb_ig_years()),
  name = FALSE,
  language = c("en", "es", "ru", "ar", "zh", "fr")
)

Arguments

iso3

Character vector of ISO3 codes.

region

Type of region to return. Can be any of "who_region" (default), "un_region", "un_subregion", or "wb_ig".

year

For World Bank Income Group only, specify the year to return.

name

For UN region and subregion only. If TRUE, return official UN name instead of M49 code.

language

For UN region and subregion only, if returning name. A character value specifying the language of the country names. Should be specified using the ISO2 language code.

Value

Character vector.


caldwellst/whotilities documentation built on April 8, 2021, 3:52 a.m.