get_geo_codes: Get the ISO3 codes of standard country groups

View source: R/get_geo_codes.R

get_geo_codesR Documentation

Get the ISO3 codes of standard country groups

Description

Gets the ISO3 codes of standard country groups available for the different input-output tables. The resulting format can be used to extract elements of a matrix using grep.

Usage

get_geo_codes(geo_id, wiotype = "icio2023", icio_extend = FALSE)

Arguments

geo_id

String, country group id. Available geo_ids for a specific input-output table can be obtained with the command info_geo().

wiotype

String, type of input-output table.

icio_extend

Boolean. If TRUE and the input-output table is of type icio extended, codes will also include the extended elements for China (CN1, CN2) and Mexico (MX1, MX2).

Value

Codes of country/countries ready to grep, e.g. AUS|ARG|BEL

Examples

# Get the codes of EU27 countries
get_geo_codes("EU27", "icio2023")
# Gets the codes for NAFTA and extends MEX to MX1|MX2
get_geo_codes("NAFTA", "icio2023", icio_extend = TRUE)

exvatools documentation built on Sept. 17, 2024, 1:07 a.m.