loadtradefile: Function to load raw Comtrade or Eurostat data from csv file...

Description Usage Arguments Details

Description

Function to load raw Comtrade or Eurostat data from csv file and procees it.

Usage

1
2
3
4
5
6
loadtradefile(file = file.path(Sys.getenv("HOME"),
  "ct_tariffline_unlogged_2014.csv.gz"), chapters = c(1:24, 33, 35, 38, 40:43,
  50:53), tariffline = grepl("tariffline", file),
  coltypes = ifelse(tariffline, "cci__i_c_______", "cc_ciic___"),
  colnames = if (tariffline) c("chapter", "reporter", "year", "flow", "hs")
  else c("chapter", "reporter", "hs", "flow", "stat_regime", "year"))

Arguments

file

Source csv file path.

Details

The function is copied and adapted from trade module. The function returns records sufficed the following requirements: * the chapters of interest, * numeric values in reporter and hs columns, * length of hs codes is more than 6.


SWS-Methodology/hsfclmap documentation built on May 9, 2019, 11:53 a.m.