Description Usage Value Examples
The function will use the database connector provided as RMariaDBcon argument. It will load the product from an archive table and a recent table. The function will combine the archive table and the recent table in one dataframe and will return a dataframe.
1 2 | loadcomext1product(RMariaDBcon, productanalysed,
monthlytable = "raw_comext_monthly", tableunit = "vld_comext_unit")
|
a data frame containing Comext trade flows for the given product
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run: # Clean product and country codes
# Connect to the database
con <- RMariaDB::dbConnect(RMariaDB::MariaDB(), dbname = "tradeflows")
# Load data for product 44079910
dtf <- loadcomext1product(con,
productanalysed = "44071091",
tablearchive = "raw_comext_monthly_2016S1",
rawtable = "raw_comext_monthly_201709")
head(dtf)
unique(dtf$year)
# Disconnect from the database
RMariaDB::dbDisconnect(con)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.