Learn R Programming

concordance (version 1.6)

desc: desc

Description

Product classification description

Usage

desc(sourcevar, origin)

Arguments

sourcevar

Vector which contains the codes to be described

origin

Coding scheme of origin (name enclosed in quotes "")

Value

Returns list of code nomenclatures. Does not differentiate between codes corresponding to different codes in input vector.

Details

Supports the following classifications: HS, HS0, HS1, HS2, HS3, HS4, ISIC2, ISIC3, SITC1, SITC2, SITC3, SITC4, BEC, NAICS.

The following strings can be used as arguments for origin or destination: "hs" (for HS Combined), "hs0" (1988/92), "hs1" (1996), "hs2" (2002), "hs3" (2007), "hs4" (2012), "isic2", "isic3", "sitc1", "sitc2", "sitc3", "sitc4", "bec", "naics".

Also accepts truncated (shorter) or disaggregated (longer) codes.

Examples

Run this code
# NOT RUN {
codes.of.origin <- codedesc$sitc3 # Vector of values to be converted
desc(codes.of.origin, "sitc3")

desc("00121", "sitc3")
## % Returns vector "Meat sheep/goat fr/ch/fz"

desc("0012", "sitc3")
## % Returns vector of length 6:
## % "Meat sheep/goat fr/ch/fz" "Pork fresh/chilled/frozn" "Poultry fresh/chld/frozn"
## % "Meat,equine,frsh/chl/frz" "Edible offal,frs/chl/frz" "Meat/offal nes,fr/ch/frz"
## % these are descriptions for all the codes starting with 0012
# }

Run the code above in your browser using DataLab