concord_isic_bec | R Documentation |
Concords International Standard Industrial Classification codes (ISIC Revision 2, 3, 3.1, 4) to and from Broad Economic Classification codes (BEC Revision 4) via the bridge of Harmonized System codes.
concord_isic_bec(sourcevar, origin, destination, dest.digit = 2, all = FALSE)
sourcevar |
An input character vector of ISIC or BEC codes. The function accepts 1 to 4-digit codes for ISIC and 1 to 3-digit codes for BEC. |
origin |
A string setting the input industry classification: "ISIC2" (1968), "ISIC3" (1989), "ISIC3.1" (2002), "ISIC4" (2008), "BEC4" (2016). |
destination |
A string setting the output industry classification: "ISIC2" (1968), "ISIC3" (1989), "ISIC3.1" (2002), "ISIC4" (2008), "BEC4" (2016). |
dest.digit |
An integer indicating the preferred number of digits for output codes. Allows 1 to 4 digits for ISIC and 1 to 3 digits for BEC codes. The default is 2 digits. |
all |
Either TRUE or FALSE. If TRUE, the function will return (1) all matched outputs for each input, and (2) the share of occurrences for each matched output among all matched outputs. Users can use the shares as weights for more precise concordances. If FALSE, the function will only return the matched output with the largest share of occurrences (the mode match). If the mode consists of multiple matches, the function will return the first matched output. |
The matched output(s) for each element of the input vector. Either a list object when all = TRUE or a character vector when all = FALSE.
Concordance tables provided by:
United Nations Trade Statistics <https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp>
# one input: one-to-multiple match
concord_isic_bec(sourcevar = "1110",
origin = "ISIC2", destination = "BEC4",
dest.digit = 2, all = FALSE)
concord_isic_bec(sourcevar = "1110",
origin = "ISIC2", destination = "BEC4",
dest.digit = 2, all = TRUE)
# two inputs: multiple-to-multiple match
concord_isic_bec(sourcevar = c("3211", "2901"),
origin = "ISIC2", destination = "BEC4",
dest.digit = 2, all = FALSE)
concord_isic_bec(sourcevar = c("3211", "2901"),
origin = "ISIC2", destination = "BEC4",
dest.digit = 2, all = TRUE)
# repeated inputs
concord_isic_bec(sourcevar = c("3720", "3720"),
origin = "ISIC2", destination = "BEC4",
dest.digit = 2, all = FALSE)
# if no match, will return NA and give warning message
concord_isic_bec(sourcevar = c("3721", "2911"),
origin = "ISIC2", destination = "BEC4",
dest.digit = 2, all = FALSE)
# 3-digit inputs, 1-digit outputs
concord_isic_bec(sourcevar = c("372", "381"),
origin = "ISIC2", destination = "BEC4",
dest.digit = 1, all = TRUE)
# BEC4 to ISIC2
concord_isic_bec(sourcevar = c("1", "7"),
origin = "BEC4", destination = "ISIC2",
dest.digit = 4, all = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.