Skip to content

comtradr

Interface with the United Nations Comtrade API

v1.0.5 · Dec 15, 2025 · GPL-3

Description

Interface with and extract data from the United Nations 'Comtrade' API <https://comtradeplus.un.org/>. 'Comtrade' provides country level shipping data for a variety of commodities, these functions allow for easy API query and data returned as a tidy data frame.

Downloads

CRAN

805

Last 30 days

4020th

2.7K

Last 90 days

10.7K

Last year

Trend: -3.9% (30d vs prior 30d)

r2u CRAN

17

Last 30 days

53

Last 90 days

228

Last year

Trend: -46.9% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 28, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE May 27, 2026
ERROR r-devel-linux-x86_64-debian-gcc

tests

Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [8s/21s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # W
...[truncated]...
::req_perform(httr2::request(datasets$fileuri))
   4.       └─httr2:::handle_resp(req, resp, error_call = error_call)
   5.         └─rlang::cnd_signal(resp)
  
  [ FAIL 1 | WARN 0 | SKIP 11 | PASS 293 ]
  Error:
  ! Test failures.
  Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 9, 2026
ERROR 11 OK · 0 NOTE · 0 WARNING · 3 ERROR · 0 FAILURE Apr 2, 2026
ERROR r-devel-linux-x86_64-debian-gcc

tests

Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [7s/19s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # W
...[truncated]...
::req_perform(httr2::request(datasets$fileuri))
   4.       └─httr2:::handle_resp(req, resp, error_call = error_call)
   5.         └─rlang::cnd_signal(resp)
  
  [ FAIL 1 | WARN 0 | SKIP 11 | PASS 293 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-devel-windows-x86_64

tests

Running 'spelling.R' [0s]
  Running 'testthat.R' [20s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where s
...[truncated]...
::req_perform(httr2::request(datasets$fileuri))
   4.       └─httr2:::handle_resp(req, resp, error_call = error_call)
   5.         └─rlang::cnd_signal(resp)
  
  [ FAIL 1 | WARN 0 | SKIP 11 | PASS 293 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-patched-linux-x86_64

tests

Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [9s/14s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # W
...[truncated]...
::req_perform(httr2::request(datasets$fileuri))
   4.       └─httr2:::handle_resp(req, resp, error_call = error_call)
   5.         └─rlang::cnd_signal(resp)
  
  [ FAIL 1 | WARN 0 | SKIP 11 | PASS 293 ]
  Error:
  ! Test failures.
  Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Dependency Network

Dependencies Reverse dependencies lifecycle fs readr askpass cli httr2 rlang stringr poorman lubridate purrr rappdirs memoise cachem comtradr

Version History

14 tracked
new 1.0.5 Mar 10, 2026
updated 1.0.5 ← 1.0.4 diff Dec 14, 2025
updated 1.0.4 ← 1.0.3 diff Sep 26, 2025
updated 1.0.3 ← 1.0.2 diff Nov 14, 2024
updated 1.0.2 ← 1.0.1 diff Sep 19, 2024
updated 1.0.1 ← 1.0.0 diff May 23, 2024
updated 1.0.0 ← 0.4.0.0 diff May 13, 2024
updated 0.4.0.0 ← 0.3.0 diff Feb 5, 2024
updated 0.3.0 ← 0.2.2 diff Apr 19, 2022
updated 0.2.2 ← 0.2.1 diff Oct 4, 2018
updated 0.2.1 ← 0.1.0 diff May 4, 2018
updated 0.1.0 ← 0.0.2 diff Oct 23, 2017
updated 0.0.2 ← 0.0.1 diff Jul 3, 2017
new 0.0.1 Apr 4, 2017