| ct_compare | R Documentation |
Compare multiple countries' trade in a given commodity, showing exports, imports, balance, and revealed comparative advantage.
ct_compare(reporters, commodity = "TOTAL", year = NULL, cache = TRUE)
reporters |
Character vector. ISO3 codes for countries to compare. |
commodity |
Character. Commodity code. Default |
year |
Integer. Year to query. |
cache |
Logical. Default |
A data.frame with columns: reporter, reporter_desc, exports, imports, balance, rca.
op <- options(comtrade.cache_dir = tempdir())
ct_compare(c("GBR", "DEU", "FRA"), commodity = "87", year = 2023)
options(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.