Store your UN Comtrade API key for the current session. The key is saved as an R option and optionally as an environment variable for persistence.
Arguments
- key
Character. Your Comtrade API subscription key.
- install
Logical. If
TRUE, also sets theCOMTRADE_API_KEYenvironment variable viaSys.setenv(), which persists for the current R session. For permanent storage, addCOMTRADE_API_KEY=your-keyto your.Renvironfile. DefaultFALSE.
Details
Get a free API key at https://comtradedeveloper.un.org/. The free tier allows 500 calls per day and up to 100,000 records per call.