ct_growth: Trade Growth Over Time

View source: R/analytics.R

ct_growthR Documentation

Trade Growth Over Time

Description

Compute year-on-year and cumulative trade growth for a bilateral flow.

Usage

ct_growth(
  reporter,
  partner = "0",
  commodity = "TOTAL",
  flow = "X",
  years = NULL,
  cache = TRUE
)

Arguments

reporter

Character. Reporter country ISO3 code.

partner

Character. Partner country code. Default "0" (World).

commodity

Character. Commodity code. Default "TOTAL".

flow

Character. "X" or "M". Default "X".

years

Integer vector. Years to query (at least 2).

cache

Logical. Default TRUE.

Value

A data.frame with columns: year, value, growth_yoy, growth_cumulative, index_100.

Examples


op <- options(comtrade.cache_dir = tempdir())
ct_growth("GBR", flow = "X", years = 2018:2023)
options(op)


comtrade documentation built on April 13, 2026, 5:07 p.m.