| ct_balance | R Documentation |
Compute the trade balance (exports minus imports) for a reporter country against each trading partner.
ct_balance(
reporter,
partner = "0",
year = NULL,
commodity = "TOTAL",
cache = TRUE
)
reporter |
Character. Reporter country ISO3 code. |
partner |
Character. Partner country code, or |
year |
Integer. Year(s) to query. |
commodity |
Character. Commodity code. Default |
cache |
Logical. Default |
A data.frame with columns: partner, partner_desc, year, exports, imports, balance.
op <- options(comtrade.cache_dir = tempdir())
ct_balance("GBR", year = 2023)
options(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.