Rank a country's trading partners by total trade value.
Examples
# \donttest{
op <- options(comtrade.cache_dir = tempdir())
ct_top_partners("GBR", flow = "X", year = 2023)
#> Warning: Country code "ALL" not found in reference table. Passing to API as-is.
#> Error in ct_request(endpoint, params): Comtrade API authentication failed (HTTP 401).
#> ℹ Check your API key with `ct_set_key()`.
#> ℹ Get a free key at <https://comtradedeveloper.un.org/>
options(op)
# }