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

Description Usage Arguments Value

View source: R/hsInRange.R

Description

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

Usage

1
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 May 4, 2018, 1:23 p.m.