hsInRange: Looks for corresponding FCL codes in country-specific mapping...

View source: R/hsInRange.R

hsInRangeR Documentation

Looks for corresponding FCL codes in country-specific mapping tables from MDB files

Description

Looks for corresponding FCL codes in country-specific mapping tables from MDB files

Usage

hsInRange(uniqhs, maptable, parallel = FALSE)

Arguments

uniqhs

Data frame with columns reporter, flow, hsext.

maptable

Data frame with HS->FCL mapping with columns area, flow, fromcode, tocode, fcl

parallel

Logical. Should multicore backend be used.

Value

Data frame with columns reporter, flow, datumid, hs, hsext, fcl. datumid holds row numbers of original dataset. hs is input hs. hsext is input hs with additional zeros if requires. If there are multiple HS->FCL matchings, all of them are returned with similar id. If there were no matching FCL codes, NA in fcl column is returned.


SWS-Methodology/faoswsTrade documentation built on Feb. 13, 2023, 1:04 a.m.