Description Usage Arguments Details
Function to load raw Comtrade or Eurostat data from csv file and procees it.
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"))
|
file |
Source csv file path. |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.