filterandrenamedat: Create a shorter .dat file containing only products starting...

Description Usage Arguments Value Examples

View source: R/readcomext.R

Description

Prepare a .dat file for its transfer into the database. See docs/read_comext_files.Rmd for developments that let to this awk command: awk -F, 'NR==1 {print "different column"} $3 ~ /^44/' nc201501.dat|less

Prepare a dat file for input into the database

Usage

1
filterandrenamedat(datfile, productcodestart)

Arguments

datfile

character path to a .dat file

productcodestart

numeric or character "08" product code starting with

Value

character name of the result file

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Download a file from the [comext bulk download repository](http://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?sort=1&dir=comext), then
mkdir /tmp/comext
then extract the .7z file with the bash command
# 7zr e nc201501.7z
# then prepare the .dat file with the R command
filterandrenamedat("/tmp/comext/nc201501.dat",44)

## End(Not run)

stix-global/eutradeflows documentation built on Nov. 13, 2020, 9:23 p.m.