get_sec_codes: Get the ISO3 codes of standard sector groups

View source: R/get_sec_codes.R

get_sec_codesR Documentation

Get the ISO3 codes of standard sector groups

Description

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

Usage

get_sec_codes(sector_id, wiotype = "icio2023", remove_letter = FALSE)

Arguments

sector_id

String, sector or sector group code. Available sector_ids can be obtained with the command info_sec().

wiotype

String, type of input-output database.

remove_letter

Boolean. If TRUE, the initial letter from the sector code will be removed: D20 or C20 will become ⁠_20⁠. This is needed to grep rows and columns, as country-sector naming follows the pattern AUS_01T02, i.e., without the initial letter D or C.

Value

Codes of sector ready to grep, e.g. ⁠_01|_02|_03⁠.

Examples

# Get sector codes for manufactures in the icio2023 database.
get_sec_codes("MANUF", "icio2023")
# Get sector codes for services (including construction)
get_sec_codes("SRVWC", "icio2023")
# Get sector codes for manufacturing, removing the first letter so
# the result can be used with `grep` to select specific sectors from
# a matrix
get_sec_codes("MANUF", "icio2023", remove_letter = TRUE)

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